Search Postgresql Archives

Re: IN vs EXISTS

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

 



askel <dummy666@xxxxxxx> writes:
> Performance is at least few times better when EXISTS is used.

It really shouldn't be.  PG knows more possible plans for IN than
EXISTS, so IN should pretty much always be equal or better ... unless
the planner is making the wrong choice.  I speculate that you have
out-of-date statistics or some such.  Have you compared EXPLAIN ANALYZE
output for the two cases?  Which PG version are we talking about?

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux