[postgis-devel] automatic BVOL on spatial columns

strk at refractions.net strk at refractions.net
Mon Jan 10 23:57:11 PST 2005


Forgot to mention that I've implemented a trigger function for
the purpose of 'manually' mantaining the bbox cache.
The trigger use is based on the assumpion that you need a bbox cache
for specific tables and not in intermediate geometries (the ones
used for further manipulation).

To activate the trigger you sould issue the following command:

	CREATE TRIGGER keep_cache
		BEFORE INSERT OR UPDATE
		ON mytable FOR EACH ROW
		EXECUTE PROCEDURE cache_bbox('field');

When dumping/reloading the trigger will take the effect and still
ensure bbox cache for the relevant tables (the ones you'll use
for fast spatial queries).

I haven't gone further with this, because Paul argued it would
be a too complex path for users, but it is still available as
it is if you set AUTOCACHE_BBOX to 0 in Makefile.config.

Maybe the whole bbox caching strategies should have their own
chapter in the manual ...

--strk;

On Mon, Jan 10, 2005 at 11:16:46PM +0100, strk at refractions.net wrote:
> On Mon, Jan 10, 2005 at 02:05:46PM +0100, Markus Schaber wrote:
> > Hi, Strk,
> > 
> > How is the BBox Cache supposed to survive a dump/reload of the database?
> > 
> > If we go the way of making the BBox Cache a compile-time decision, we do
> > not have a problem.
> > 
> > But if it is to be done by the user manually, we have to make the cache
> > presence bit part of our canonical representation. (We do not have to
> > make the bbox itsself part of the canonical rep as we can recalculate it
> > at reloading.)
> 
> Nooo! Not another extension ;)
> If AUTOCACHE_BBOX is on (current default) canonical input will
> compute bbox for COMPLEX_GEOMS (!points).
> If AUTOCACHE_BBOX is off, the user is responsible to manually
> add a cache.
> --strk;
> > 
> > Thanks,
> > Markus
> > -- 
> > markus schaber | dipl. informatiker
> > logi-track ag | rennweg 14-16 | ch 8001 zürich
> > phone +41-43-888 62 52 | fax +41-43-888 62 53
> > mailto:schabios at logi-track.com | www.logi-track.com
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
> 
> -- 
> 
> For standing up against patentability of software,
> 
>   Thank You, Poland!
> 
> Read the intervention:    http://kwiki.ffii.org/ConsPolon041221En
> Send your thanks:         thankyoupoland.info
> Read/do more:		  http://www.noepatents.org/
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel

-- 

For standing up against patentability of software,

  Thank You, Poland!

Read the intervention:    http://kwiki.ffii.org/ConsPolon041221En
Send your thanks:         thankyoupoland.info
Read/do more:		  http://www.noepatents.org/



More information about the postgis-devel mailing list