Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> 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
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to