Hi,
On 22.01.2013 11:17, Paweł Paprota wrote:
So every WMS map request generates something like this:
SELECT "type",encode(ST_AsBinary(ST_Force_2D("way")),'base64') as "way"
FROM "public"."view_railways" WHERE ("way" && ST_GeomFromText('POLYGON
((2031543.337480622 6414748.28685562, 2031543.337480622
6578323.527363132, 2195118.5779881305 6578323.527
363132, 2195118.5779881305 6414748.28685562, 2031543.337480622
6414748.28685562))', 900913) AND "type" = 'rail')
Such requests are ideally served by a conditional index (i.e. when you
create the index with a "WHERE type=rail" clause). Since your WMS is
probably not running custom queries, you can pre-create these indexes
and they're not even terribly expensive to create. Having a large number
of them slows down updates but having them for the 5-10 most
time-consuming SELECTs is certainly worth it.
Bye
Frederik
--
Frederik Ramm ## eMail frede...@remote.org ## N49°00'09" E008°23'33"
_______________________________________________
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev