Planner not choosing GIN index

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Planner not choosing GIN index
Дата
Msg-id CADkLM=d5DO1ud1tX0CUajmEwB3=jVUaUBqghv0116Jk=U7jKBQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Planner not choosing GIN index  (Flo Rance <trourance@gmail.com>)
Список pgsql-performance
A client had an issue with a where that had a where clause something like this:

WHERE 123456 = ANY(integer_array_column)

I was surprised that this didn't use the pre-existing GIN index on integer_array_column, whereas recoding as

WHERE ARRAY[123456] <@ integer_array_column

did cause the GIN index to be used. Is this a known/expected behavior? If so, is there any logical reason why we couldn't have the planner pick up on that?

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

Предыдущее
От: MichaelDBA
Дата:
Сообщение: Re: Shared_buffers
Следующее
От: Flo Rance
Дата:
Сообщение: Re: Planner not choosing GIN index