Re: Use of multipart index with "IN"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Use of multipart index with "IN"
Дата
Msg-id 400.1067275029@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Use of multipart index with "IN"  (Rob Messer <rrmesser@yahoo.com>)
Список pgsql-performance
Rob Messer <rrmesser@yahoo.com> writes:
> The problem comes in when we are selecting multiple field_name values
> in one query.  The normal SQL syntax we have been using is like this:

> select field_name, option_tag from ds_rec_fld where recid = 3001 and
> field_name in ('Q3A1', 'Q3A9');

You'd have better luck if field_name were the first column of the
two-column index.  See the archives.

Improving this situation is on the to-do list but it seems not trivial
to fix.

            regards, tom lane

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

Предыдущее
От: Rob Nagler
Дата:
Сообщение: Re: vacuum locking
Следующее
От: Dror Matalon
Дата:
Сообщение: Re: Various performance questions