| От | Josh Berkus |
|---|---|
| Тема | Re: Queries with timestamps |
| Дата | |
| Msg-id | 200401211106.06506.josh@agliodbs.com обсуждение исходный текст |
| Ответ на | Queries with timestamps ("Arnau" <arnaulist@andromeiberica.com>) |
| Ответы |
Re: Queries with timestamps
|
| Список | pgsql-performance |
Arnau, > As the number of rows grows the time needed to execute this query takes > longer. What'd I should do improve the performance of this query? Tip #1) add an index to the timestamp column Tip #2) make sure that you VACUUM and ANALYZE regularly Tip #3) You will get better performance if you pass the "current_date - 1 month" as a constant from the client instead of in the query. This is a known issue, expected to be fixed in 7.5. -- -Josh Berkus Aglio Database Solutions San Francisco
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера