| От | Alan Hodgson |
|---|---|
| Тема | Re: more problems with count(*) on large table |
| Дата | |
| Msg-id | 200710011012.05779@hal.medialogik.com обсуждение исходный текст |
| Ответ на | Re: more problems with count(*) on large table (Mike Charnoky <noky@nextbus.com>) |
| Список | pgsql-general |
On Monday 01 October 2007, Mike Charnoky <noky@nextbus.com> wrote: > This is strange... count(*) operations over a period of one day's worth > of data now take ~1-2 minutes to run or ~40 minutes. It seems that the > first time the data is queried it takes about 40 minutes. If I try the > query again, it finishes in 1-2 minutes! > > Again, nothing else is happening on this db server except for a constant > insertion into this table and a few others. I have done "set statistics > 100" for the evtime field in this table. The first time, you're reading from disk. The second time, you're reading from cache. Tens of millions of disk seeks don't come cheap. -- We're Microsoft. Everything else is just patent infringement.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера