From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | Becky Neville <rebecca(dot)neville(at)yale(dot)edu>, <andrew(at)libertyrms(dot)info>, <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: NOT IN doesn't use index? (fwd) |
Date: | 2003-05-04 04:05:42 |
Message-ID: | 20030504120511.M43020-100000@houston.familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
AFAIK, it's only the IN (large subquery) form that is slow...
Chris
On Sat, 3 May 2003, Joe Conway wrote:
> Becky Neville wrote:
> > Here is the EXPLAIN output from the two queries. The first is the one
> > that uses WHERE field NOT IN ( 'a','b' etc ). The second is the (much
>
> Unless you are working with Postgres 7.4devel (i.e. cvs HEAD), the IN
> construct is notoriously slow in Postgres. In cvs it is vastly improved.
>
> Also, as I mentioned in the other reply, send in "EXPLAIN ANALYZE"
> results instead of "EXPLAIN" (and make sure you run "VACUUM ANALYZE" first).
>
> Joe
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-05-04 04:42:00 | Re: Suggestions wanted for 7.2.4 query |
Previous Message | Josh Berkus | 2003-05-04 02:28:52 | Suggestions wanted for 7.2.4 query |