Re: Terrible perfomance during nested "... where x in (select ...)" operator - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: Terrible perfomance during nested "... where x in (select ...)" operator
Date
Msg-id Pine.BSF.4.21.0105111106420.98443-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Terrible perfomance during nested "... where x in (select ...)" operator  (Черепанов Леонид<leo@rusmedia.net>)
List pgsql-bugs
Known issue, see FAQ item 4.23.  Short form, use exists rather
than in.

On Tue, 8 May 2001, [KOI8-R] þÅÒÅÐÁÎÏ× ìÅÏÎÉÄ wrote:

> Leonid (leo@rusmedia.net) reports a bug with a severity of 2(?)
>
> Short Description
> Terrible perfomance during nested "... where x in (select ...)" operator
>
> Long Description
> PostgreSQL 7.1, FreeBSD 4.2-STABLE
>
> Analyzing the reasons for terrible perfomance of my query I've found
> a very strange thing. Here is sublimation.
>
> Queries like
>  select distinct i from t1 where i in
>   (select distinct i from t2 where j in
>    (select distinct j from t3));
> is much-much slower than
>  select distinct t1.i from t1,t2,t3 where t1.i=t2.i and t2.j=t3.j;

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: instalation problems!
Next
From: Tom Lane
Date:
Subject: Re: exists <==> not exists ???