Re: Hardware/OS recommendations for large databases (
В списке pgsql-performance по дате отправления:
| От | Mark Kirkwood |
|---|---|
| Тема | Re: Hardware/OS recommendations for large databases ( |
| Дата | |
| Msg-id | 438639B6.5090902@paradise.net.nz обсуждение исходный текст |
| Ответ на | Re: Hardware/OS recommendations for large databases ( (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-performance |
Tom Lane wrote: > Greg Stark <gsstark@mit.edu> writes: > >>Last I heard the reason count(*) was so expensive was because its state >>variable was a bigint. That means it doesn't fit in a Datum and has to be >>alloced and stored as a pointer. And because of the Aggregate API that means >>it has to be allocated and freed for every tuple processed. > > > There's a hack in 8.1 to avoid the palloc overhead (courtesy of Neil > Conway IIRC). > It certainly makes quite a difference as I measure it: doing select(1) from a 181000 page table (completely uncached) on my PIII: 8.0 : 32 s 8.1 : 25 s Note that the 'fastcount()' function takes 21 s in both cases - so all the improvement seems to be from the count overhead reduction. Cheers Mark
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера