Re: Seqscan in MAX(index_column)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Seqscan in MAX(index_column)
Дата
Msg-id 27375.1062732744@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Seqscan in MAX(index_column)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Seqscan in MAX(index_column)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> You could doubtless maintain a fairly good approximate total this
>> way, and that would be highly useful for some applications ...
>> but it isn't COUNT(*).

> With MVCC allowing multiple rows with only one visible, I thought the
> INSERT/DELETE system would work --- once the delete becomes visible, the
> change becomes visible.

Oh, you're imagining the cache as being a row in an ordinary table?
I doubt that could work.  Multiple transactions trying to update these
rows would suffer from contention and deadlock problems, wouldn't they?
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Seqscan in MAX(index_column)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Seqscan in MAX(index_column)