[postgis-devel] automatic BVOL on spatial columns

strk at refractions.net strk at refractions.net
Thu Dec 23 06:03:51 PST 2004


The bounding box of an LWGEOM geometry is
an optional 'cache', currently absent at
construction time.

Bounding boxes can be added using addBBOX(geom)
and removed using dropBBOX(geom).

Having a bbox cached speeds up bbox operation
like &&, but increases on-disk size.

Note that an index scan does not need to 
compute the bbox, but its construction does.
Also note that our GiST index has a RECHECK
clause on each operator, thus practically
needing the bbox check (so it's computation)
for every 'candidate' row returned from the
index scan.

Previous (HWGEOM) geometry type did *always*
have this cache available.

My proposal is to add a RULE on INSERT and
UPDATES of geometry columns from within
AddGeoemtryColumn, so that all geometry 
columns exept 'POINT' type (for which bbox
computation is very fast) have a BBOX
computed.

What do you think ?

--strk;



More information about the postgis-devel mailing list