Re: Optimize query: time of "single * IN(many)" > time

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Optimize query: time of "single * IN(many)" > time
Дата
Msg-id 20040108114427.GB753@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Optimize query: time of "single * IN(many)" > time  (Dave Smith <dave.smith@candata.com>)
Список 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)

В списке pgsql-general по дате отправления:

Предыдущее
От: Dave Smith
Дата:
Сообщение: Re: Optimize query: time of "single * IN(many)" > time
Следующее
От: Travel Jadoo
Дата:
Сообщение: order by is ambiguous