| От | Owen Jacobson |
|---|---|
| Тема | Faster count(*)? |
| Дата | |
| Msg-id | 000101c59d33$36a4a560$9b00015a@osl.com обсуждение |
| Ответы |
Re: **SPAM** Faster count(*)?
Re: Faster count(*)? |
| Список | pgsql-sql |
Salve. I understand from various web searches and so on that PostgreSQL's MVCC mechanism makes it very hard to use indices or table metadata to optimise count(*). Is there a better way to guess the "approximate size" of a table? I'm trying to write a trigger that fires on insert and performs some maintenance (collapsing overlapping boxes into a single large box, specifically) as the table grows. My initial attempt involved count(*) and, as the number of pages in the table grew, that trigger bogged down the database. Any thoughts? -O
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера