[postgis-devel] Re: geometry stats

David Blasby dblasby at refractions.net
Mon Feb 23 10:03:33 PST 2004


> Finally we should 'normalize' the histogram dividing the value of each
> cell by the number of not-null (or total) samples handled.  This should
> give a tune-free histogram, what do you think? Mark?

I dont think you should normalize the histogram - just keep the 
'normalization' value in the histogram.

I think this will make it easier to keep the histogram updated.

{load in the current histogram, or create a new one if there isnt 
currently one}

1. Is the bounding box the new set of features outside the extents of 
the histogram?
       YES - need to re-jig histogram.  This is relatively difficult.

2. add 1 to each of the histogram's cells that a feature's box overlaps 
by >5%.

3. have the histogram keep track of the total number of new features in it.

Every 'vacuum analyse' you do should make the histogram "smarter".

dave



More information about the postgis-devel mailing list