maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] Re: PostGIS help for MapOSMatic


From: Jean-Christophe Arnu
Subject: Re: [Maposmatic-dev] Re: PostGIS help for MapOSMatic
Date: Mon, 1 Mar 2010 10:12:29 +0100

> - before the run : using a table instead of a view for 'cities_area_by_name'
> may be of interest in order to build a dedicated spatial index for city
> boundaries ? If this table/view is built only one time for each base update
> (daily) the time taken may be of interest,

That's true, views are evaluated each time. Depending on the query it
could be painful to get performance out of the query. Maybe instead of
the view, there might be interesting to write an SQL stored procedure
with immutable  attribute and returning a set of (rows) data retrieved
by the view. Thus PostgreSQL will evalutate the function once and then
use the cache for each row, each time it is called.


> A way to ensure that spatial indexes are used is to add a "&&" part to the
> query maybe like this (2nd line added) :

I'm not a PostGIS expert so I could not help on that part. The only
way to get information on index usage in a query is to use explain and
watch carefully the result.

regards,


-- 
Jean-Christophe Arnu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]