| От | Tobias Brox |
|---|---|
| Тема | Re: Querying 19million records very slowly |
| Дата | |
| Msg-id | 20050622080357.GW7839@tobias обсуждение исходный текст |
| Ответ на | Re: Querying 19million records very slowly (Kjell Tore Fossbakk <kjelltore@gmail.com>) |
| Ответы |
Re: Querying 19million records very slowly
|
| Список | pgsql-performance |
[Kjell Tore Fossbakk - Wed at 09:45:22AM +0200] > database=> explain analyze select count(*) from test where p1=53 and > time > now() - interval '24 hours' ; Sorry to say that I have not followed the entire thread neither read the entire email I'm replying to, but I have a quick hint on this one (ref my earlier thread about timestamp indices) - the postgresql planner will generally behave smarter when using a fixed timestamp (typically generated by the app server) than logics based on now(). One of my colleagues also claimed that he found the usage of localtimestamp faster than now(). -- Tobias Brox, +86-13521622905 Nordicbet, IT dept
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера