Quoting Jan Weerts <j.weerts@i-views.de>:
>
> One
> of our expensive queries contains NOT IN and IN as subqueries. As I
> was advised on this list, I tried to replace IN with EXISTS. When
> doing so for part of the query (omitting one of the IN subqueries)
> the IN and EXIST versions are both about the same speed in execution
> (about 30sec).
I am wondering if the NOT might negate any positive effects from the
switch to EXIST.
> My next plan is to switch from 7.1.3 to 7.2, but that requires some
> planning, as the database is permamently used.
I would say that is a good idea anyway, but maybe you can post your
query. There might be a way to totally rewrite it like the CASE & GROUP
BY idea for Jean-Christian (not that that idea is faster by definition,
but you never know).
Jochem