| От | Tom Lane |
|---|---|
| Тема | Re: for help! |
| Дата | |
| Msg-id | 18664.1050508916@sss.pgh.pa.us обсуждение |
| Ответ на | Re: for help! (Andrew Sullivan <andrew@libertyrms.info>) |
| Ответы |
Re: for help!
|
| Список | pgsql-performance |
Andrew Sullivan <andrew@libertyrms.info> writes:
> But you _could_ write a trigger which inserts into a "staging" table,
> and write a little daemon which only updates the count table with the
> data from the staging table. It's a mighty ugly hack, but it ought
> to work.
The $64 question with this sort of thing is "how accurate (up-to-date)
does the count have to be?".
Given that Josh is willing to vacuum every five minutes, he might find
that returning pg_class.reltuples is Close Enough (TM).
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера