Nachtrag zu: [Mapserver-DE] Geschwindigkeit
Arnulf Christl
arnulf.christl at ccgis.de
Don Nov 3 11:03:58 CET 2005
Hallo,
auf der EN Seite gabs wieder frisches Futter zu Fragen der optimalen
Performance. Paul hat es so zusammengefasst:
+++
What happens is that mapserver constructs a SQL query which asks
(paraphrasing)
"Give me spatial data that is inside this bounding box and has this
attribute condition"
PostgreSQL takes that SQL and creates an optimal query plan for it.
Shape file cannot do that. In theory, PostgreSQL/PostGIS will be
faster, particularly if both your spatial data and attribute data have
indexes. An optimal query plan will use the attribute index if it is
more selective than the spatial index. The trouble is that categories
don't tend to be very selective, in general, so the practical
performance of this setup is not going to be super. If you goal is
*only* performance, you are better off simply extracting your our data
file into several files, one for each zoom level, each with only the
data you want drawn at that zoom level. That is the solution that will
*always* be fastest.
Paul
+++
Es gibt da noch einen offenen Bug in MapServer. Bei rein attributiven
WFS-Anfragen an große Datenmengen erfolgt der Zugriff ohne
Umgebungsrechteck. Deshalb greift der GiST Index nicht. Weil da niemand
mit gerechnet hat startet MapServer dann *zuerst* einen Fulltable Scan
und setzt *danach* erst den attributiven Filter, das macht u.U. für eine
Weile die Datenbank platt, also aufpassen.
Gruß, Arnulf.
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)