Re: Really dumb planner decision

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Matthew Wakeling <matthew(at)flymine(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Really dumb planner decision
Date: 2009-04-16 11:16:13
Message-ID: 2f4958ff0904160416m58f115fu3f823269cec30bdf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Apr 16, 2009 at 11:37 AM, Matthew Wakeling <matthew(at)flymine(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Matthew Wakeling 2009-04-16 11:24:42 Re: Really dumb planner decision
Previous Message Grzegorz Jaśkiewicz 2009-04-16 10:48:19 Re: Really dumb planner decision