Re: Optimising "in" queries

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Optimising "in" queries
Дата
Msg-id D7364220-64D0-4406-A1D6-A5BA4FE67406@seespotcode.net
обсуждение исходный текст
Ответ на Optimising "in" queries  (Stephen Davies <scldad@sdc.com.au>)
Список pgsql-performance
[Please don't top post as it makes the discussion more difficult to
follow.]

On Aug 22, 2007, at 18:30 , Stephen Davies wrote:

> I have always thought of array processing as the thing that vector
> processors such as Cray and ETA do/did.

(I've always heard that referred to as vector processing.)

> While superficially equivalent, I have always believed that IN (a,b,c)
> executed faster than =a or =b or =c. Am I wrong for PostgreSQL?

Depending on the numbers of the IN list and other statistcs, I
believe PostgreSQL will rewrite z in IN (a, b, ...) into either (z =
a) OR (z = b) OR ... or somehow add it to the join list, so
performance will vary.

Michael Glaesemann
grzm seespotcode net



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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: When/if to Reindex
Следующее
От: Russell Smith
Дата:
Сообщение: Re: Optimising "in" queries