Re: count(*) using index scan in "query often, update rarely"

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: count(*) using index scan in "query often, update rarely"
Дата
Msg-id 434681F5.6000906@archonet.com
обсуждение исходный текст
Ответ на Re: count(*) using index scan in "query often, update rarely" environment  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Tom Lane wrote:
>
> There's a workable-looking design in the archives (pghackers probably)
> for maintaining overall table counts in a separate table, with each
> transaction adding one row of "delta" information just before it
> commits.  I haven't seen anything else that looks remotely attractive.

It might be useful if there was a way to trap certain queries and
rewrite/replace them. That way more complex queries could be
transparently redirected to a summary table etc. I'm guessing that the
overhead to check every query would quickly destroy any gains though.

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: count(*) using index scan in "query often, update rarely" environment
Следующее
От: Chris Browne
Дата:
Сообщение: Re: Status of Opteron vs Xeon