Skip site navigation (1) Skip section navigation (2)

Re: Terrible perfomance during nested "... where x in (select ...)" operator

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Черепанов Леонид <leo(at)rusmedia(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Terrible perfomance during nested "... where x in (select ...)" operator
Date: 2001-05-11 18:08:22
Message-ID: Pine.BSF.4.21.0105111106420.98443-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: 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(at)rusmedia(dot)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;



In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2001-05-11 18:52:17
Subject: Re: exists <==> not exists ???
Previous:From: Tom LaneDate: 2001-05-11 17:25:54
Subject: Re: instalation problems!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group