On Thu, Apr 16, 2009 at 11:37 AM, Matthew Wakeling <matt...@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

-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Reply via email to