Re: Really dumb planner decision - Mailing list pgsql-performance

From Grzegorz Jaśkiewicz
Subject Re: Really dumb planner decision
Date
Msg-id 2f4958ff0904160416m58f115fu3f823269cec30bdf@mail.gmail.com
Whole thread Raw
In response to Really dumb planner decision  (Matthew Wakeling <matthew@flymine.org>)
Responses Re: Really dumb planner decision  (Matthew Wakeling <matthew@flymine.org>)
List pgsql-performance
On Thu, Apr 16, 2009 at 11:37 AM, Matthew Wakeling <matthew@flymine.org> wrote:
> SELECT *
> FROM
>    gene AS a1_,
>    intergenicregion AS a2_,
>    regulatoryregion AS a3_,
>    chromosome AS a4_,
>    location AS a5_,
>    dataset AS a6_,
>    LocatedSequenceFeatureOverlappingFeatures AS indirect0,
>    BioEntitiesDataSets AS indirect1
> WHERE
>        a1_.id = 1267676
>    AND a1_.upstreamIntergenicRegionId = a2_.id
>    AND a2_.id = indirect0.LocatedSequenceFeature
>    AND indirect0.OverlappingFeatures = a3_.id
>    AND a3_.chromosomeid = a4_.id
>    AND a3_.chromosomeLocationId = a5_.id
>    AND a3_.id = indirect1.BioEntities
>    AND indirect1.DataSets = a6_.id

On a second look, it looks like you are are joining that view twice,
at this point, I have no idea myself what it might be. But I guess it
has to search over 5M rows for each of 105 in other query.

I wonder what more experienced guys here will have to say about it.


--
GJ

pgsql-performance by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Really dumb planner decision
Next
From: Matthew Wakeling
Date:
Subject: Re: Really dumb planner decision