hubert depesz lubaczewski wrote:
> On Mon, Feb 18, 2002 at 09:52:19AM -0500, Bruce Momjian wrote:
> > Not that I know of.
>
> strange. what could lead to this results then?
> i used to think that IN (SELECT ...) is the slowest possible way at all.
>
> depesz
>
> p.s. of course both select's use indices, and table is vacuumed
I have always wondered this too. Seems IN evaluates the entire query
while EXISTS evaluates it for each row, or at least that is how I
understand it, so saying EXISTS is always faster may be wrong.
Comments?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026