Re: Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists
Дата
Msg-id 14046.1478666148@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists  (otar shavadze <oshavadze@gmail.com>)
Список pgsql-general
I wrote:
> Seems like your problem here is that the planner has no idea about the
> selectivity of this condition --- if it did, I think it would have
> made the right choice, because it would have made a much higher estimate
> for the cost of the indexscan.

> AFAICT, Postgres 9.5 does make a reasonably correct guess when given
> up-to-date stats.  I speculate that you need to ANALYZE this table.

Hmmm ... actually, I wonder if maybe '@>' here is the contrib/intarray
operator not the core operator?  The intarray operator didn't get plugged
into any real estimation logic until 9.6.

            regards, tom lane


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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Gin indexes on intarray is fast when value in array does not exists, and slow, when value exists
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: ENABLE ROW LEVEL SECURITY cause huge produce of checkpoints