Re: Re: Planner chooses slow index heap scan despite accurate row estimates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: Planner chooses slow index heap scan despite accurate row estimates
Дата
Msg-id 30303.1464394568@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Planner chooses slow index heap scan despite accurate row estimates  (Jake Magner <jakemagner90@gmail.com>)
Ответы Re: Planner chooses slow index heap scan despite accurate row estimates  (Jake Magner <jakemagner90@gmail.com>)
Список pgsql-performance
Jake Magner <jakemagner90@gmail.com> writes:
> I tried without doing an INSERT at all, just running the SELECT queries and
> the result is the same. Nested loop is chosen but is much slower.

FWIW, I just noticed that the comparisons you're using are plain equality
of the arrays.  While a GIN array index supports that, it's not exactly
its strong suit: the sort of questions that index type supports well are
more like "which arrays contain value X?".  I wonder if it'd be worth
creating btree indexes on the array column.

            regards, tom lane


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

Предыдущее
От: Jake Magner
Дата:
Сообщение: Re: Planner chooses slow index heap scan despite accurate row estimates
Следующее
От: Jake Magner
Дата:
Сообщение: Re: Planner chooses slow index heap scan despite accurate row estimates