Re: "not in" clause too slow? - Mailing list pgsql-general

From Rodrigo De León
Subject Re: "not in" clause too slow?
Date
Msg-id a55915760709210719k1202df02u29542bd05b8f9652@mail.gmail.com
Whole thread Raw
In response to "not in" clause too slow?  (Ottavio Campana <ottavio@campana.vi.it>)
List pgsql-general
On 9/21/07, Ottavio Campana <ottavio@campana.vi.it> wrote:
> My problem is that if I run the same command on another
> table with 378415 rows, it is terribly slow.

How much is "terribly slow"?

Did you VACUUM ANALYZE?

Anyways, try this:

SELECT * FROM MYTABLE T1
LEFT JOIN COPY_MYTABLE T2
ON T1.ID = T2.ID
WHERE T2.ID IS NULL

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Windows Auto-Vacuum in 8.2.4 or 8.2.5
Next
From: "Scott Marlowe"
Date:
Subject: Re: autovacuum