| От | Tom Lane |
|---|---|
| Тема | Re: timestamp indexing |
| Дата | |
| Msg-id | 24839.1117475874@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: timestamp indexing (Tobias Brox <tobias@nordicbet.com>) |
| Ответы |
Re: timestamp indexing
|
| Список | pgsql-performance |
Tobias Brox <tobias@nordicbet.com> writes:
>> What version of PostgreSQL are you using?
> Also answered in my follow-up - "not yet pg8" :)
Your followup hasn't shown up here yet, but if the query is written like
WHERE timestampcol >= now() - interval 'something'
then the pre-8.0 planner is not capable of making a good estimate of the
selectivity of the WHERE clause. One solution is to fold the timestamp
computation to a constant on the client side.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера