Re: [HACKERS] Improve perfomance for index search ANY(ARRAY[]) condition with single item

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Improve perfomance for index search ANY(ARRAY[]) condition with single item
Дата
Msg-id 12103.1500828947@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] Improve perfomance for index search ANY(ARRAY[]) condition withsingle item  (Dima Pavlov <imyfess@gmail.com>)
Ответы Re: [HACKERS] Improve perfomance for index search ANY(ARRAY[]) condition with single item  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Dima Pavlov <imyfess@gmail.com> writes:
> The problem was discussed on stackoverflow:
> https://stackoverflow.com/questions/45061966/index-usage-with-single-item-anyarray

Usually, we're not very happy with submissions that reference external
pages for justification; we like to have all the relevant material in our
mail archives.

> That's my first patch so I will be grateful for constructive criticism.

I think it would be better to do this in the planner, see specifically
eval_const_expressions.  That would allow the transformation to succeed
in more cases, like where the array is coming from a parameter rather
than an ARRAY[] construct.  That is, you should be able to do this not
only for ARRAY[x] but for any single-element constant array.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Testlib.pm vs msys
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Improve perfomance for index search ANY(ARRAY[]) condition with single item