Re: integer[] indexing.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: integer[] indexing.
Дата
Msg-id 11972.1097244206@sss.pgh.pa.us
обсуждение исходный текст
Ответ на integer[] indexing.  (Dawid Kuroczko <qnex42@gmail.com>)
Список pgsql-performance
Dawid Kuroczko <qnex42@gmail.com> writes:
> But when I phrase the query:

> SELECT * FROM table WHERE (icount(ids) <= 1 AND ids[1] = 33) OR
> (icount(ids) > 1 AND ids && '{33}');

> Planner insists on using seqscan.  Even with enable_seqscan = off;

The OR-index-scan mechanism isn't currently smart enough to use partial
indexes that are only valid for some of the OR'd clauses rather than all
of them.  Feel free to fix it ;-).  (This might not even be very hard;
I haven't looked.)

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [pgsql-benchmarks] stats on cursor and query execution troubleshooting
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: Re: Data warehousing requirements