Re: Bad row estimates

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Bad row estimates
Дата
Msg-id 87r75isk1l.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Bad row estimates  (Greg Stark <gsstark@mit.edu>)
Список pgsql-performance
Greg Stark <gsstark@MIT.EDU> writes:

> The "now() BETWEEN test_table_1.start_ts AND test_table_1.end_ts can't be
> answered completely using a btree index. You could try using a GIST index here
> but I'm not clear how much it would help you (or how much work it would be).

To add to my own comment you could also try creating two separate indexes on
start_ts and end_ts. Postgres can combine the two indexes using a bitmap scan.
It's not a complete solution like a GIST index would be though.

It also doesn't help at all with the planner estimating how many records will
actually match.

--
greg

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Bad row estimates
Следующее
От: Joost Kraaijeveld
Дата:
Сообщение: How to query and index for customer with lastname and city