Re: Seqscan in MAX(index_column)
От | Bruce Momjian |
---|---|
Тема | Re: Seqscan in MAX(index_column) |
Дата | |
Msg-id | 200309050325.h853PAa24389@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Seqscan in MAX(index_column) (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Seqscan in MAX(index_column)
|
Список | pgsql-hackers |
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > Neil Conway wrote: > >> In general, I don't think this is worth doing. > > > It is possible it isn't worth doing. Can the INSERT/DELETE > > incrementing/decrementing the cached count work reliabily? > > I don't even see how the notion of a single cached value makes > theoretical sense, when in principle every transaction may have > a different idea of the correct answer. > > 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. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
В списке pgsql-hackers по дате отправления: