[postgis-users] Extent on multiple tables

strk at refractions.net strk at refractions.net
Fri Oct 21 07:27:05 PDT 2005


On Fri, Oct 21, 2005 at 04:08:57PM +0200, Markus Schaber wrote:
> 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.

Happy to know, thank you ;)
Did you try with the subselect as well ?

--strk;



More information about the postgis-users mailing list