From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | depesz(at)depesz(dot)pl |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: IN optimization in 7.2 ????? |
Date: | 2002-02-18 15:42:45 |
Message-ID: | 200202181542.g1IFgjY21373@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Mario Weilguni | 2002-02-18 16:00:16 | Re: IN optimization in 7.2 ????? |
Previous Message | hubert depesz lubaczewski | 2002-02-18 15:40:31 | Re: IN optimization in 7.2 ????? |