Re: count(*) performance improvement ideas

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: count(*) performance improvement ideas
Дата
Msg-id 20927.1205895835@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: count(*) performance improvement ideas  ("Stephen Denne" <Stephen.Denne@datamail.co.nz>)
Ответы Re: count(*) performance improvement ideas  (Mark Mielke <mark@mark.mielke.cc>)
Список pgsql-hackers
"Stephen Denne" <Stephen.Denne@datamail.co.nz> writes:
> What I was asking about with those questions, is if a single row is inserted in transaction A, and updated 1000 times
stillwithin transaction A, then transaction A commits... does a single row version get written, or 1001, 1000 of which
areremovable?
 

Umm ... AFAICS there is no need for an UPDATE to touch the count table
at all.  You'd only need ON INSERT and ON DELETE triggers.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: count(*) performance improvement ideas
Следующее
От: Tom Lane
Дата:
Сообщение: Re: timestamp datatype cleanup