Re: Accelerating aggregates - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Accelerating aggregates
Date
Msg-id 87y8murruy.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Accelerating aggregates  (Steve Atkins <steve@blighty.com>)
Responses Re: Accelerating aggregates
List pgsql-hackers
Steve Atkins <steve@blighty.com> writes:

> So, if you take a local snapshot of the global at the beginning of
> your transaction then the visible changes at any point are those from
> transactions that commited before your transaction started. That's
> well-defined, at least, and appears to be pretty much the same as the
> standard read commited isolation level.

no, read committed would see any other updates that have been committed since
the start of your transaction. 

For some linear aggregates you could start with the initcond, apply all the
local updates and whenever you have to read the actual value then use the
global variable at that time. But not all aggregates can be handled that way.
I think all the standard ones could be though, sum(), count(), stddev(), etc.

-- 
greg



pgsql-hackers by date:

Previous
From: pgsql@mohawksoft.com
Date:
Subject: Re: Tablespaces
Next
From: pgsql@mohawksoft.com
Date:
Subject: Re: [pgsql-hackers-win32] Tablespaces