Re: Query plan for NOT IN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Wakeling <matthew@xxxxxxxxxxx> writes:
> Yes, that does work, but only because id is NOT NULL. I thought Postgres 
> 8.4 had had a load of these join types unified to make it less important 
> how the query is written?

NOT IN is not easily optimizable because of its odd behavior in the
presence of nulls.  Use NOT EXISTS instead, or that left join hack.

			regards, tom lane

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux