On Thu, Jan 08, 2004 at 06:28:14AM -0500, Dave Smith wrote:
> Firstly you should always provide an explain from your query before
> posting to this list.
You mean "while posting", because he can't possible provide the explain
before having the means to do so, can he? :-)
> I think the problem is that in <7.4 PG did not use
> indexes for IN queries. This has been fixed in 7.4.
I think what was done is to optimize queries like IN (SELECT ...) but
there has not been improvement for IN (1,2,3, ... 550) like he
appears to be doing.
Maybe something to try is putting the IDs in a (temp?) table and using
the first form.
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Cada quien es cada cual y baja las escaleras como quiere" (JMSerrat)