From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Dave Smith <dave(dot)smith(at)candata(dot)com> |
Cc: | Paul Janssen <postgresuser(at)hotmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Optimize query: time of "single * IN(many)" > time |
Date: | 2004-01-08 11:44:27 |
Message-ID: | 20040108114427.GB753@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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)
From | Date | Subject | |
---|---|---|---|
Next Message | Travel Jadoo | 2004-01-08 14:25:05 | order by is ambiguous |
Previous Message | Dave Smith | 2004-01-08 11:28:14 | Re: Optimize query: time of "single * IN(many)" > time |