[postgis-users] Extent on multiple tables

Markus Schaber schabi at logix-tt.com
Fri Oct 21 07:08:57 PDT 2005


Hi, Mark,

Mark Cave-Ayland wrote:

>>Are you sure inspected geometries will be kept in memory 
>>after state function feed ?
> 
> I'm fairly certain they would for the extent() case, because PostgreSQL will
> load the tuples from disk (and hence into shared buffers) during the
> aggregate calculation. Of course this would not be the case for
> estimated_extent() ;)

I will oppose this.

AFAIR, they are loaded row-by-row, and feed into the estimated_extend
aggregator which changes his internal state. Once processed by the
aggregate, they'll be thrown away as they're not needed any more, as
well as the shared buffers are recycled.

My local test here with a 35 million row table seems to prove this, as
the postmaster has a constant memory usage of 17M during the whole
sequential table scan.

Schabi



More information about the postgis-users mailing list