Performance of Scanning a Quadtree Index
Brock Anderson
banders at REFRACTIONS.NET
Wed Aug 29 08:07:21 PDT 2007
Hi List,
I ran into a curious situation with a quadtree (.qix) index on a
shapefile. Basically the issue is that performance of scanning the
index to fetch features is not as good as I expect. Some details:
I have a shapefile data set with 4 million polygons fairly normally
distributed around British Columbia, Canada. I used 'shptree' to create
a spatial index on that data. I have a very simple layer in my mapfile
pointing at the data. Minimal styling, no labels, etc.
I then make a simple WMS request to fetch exactly 1000 features (limited
by a bbox) from the layer. Mapserver take about 500ms.
Seems a bit high.
Geoserver can draw the exact same data, using the *same .qix* index in
about 150ms. Naturally I made every effort to keep the comparison
fair. No reprojection in either case, nearly identical styling, etc.
As a further comparison I noticed that Mapserver and Geoserver are
nearly equal for fetching/drawing 1000 features from a smaller data set
of just 10,000. Response time there is more like 120ms.
So on large shapefile data sets Geoserver's index scanning seems to be
substantially faster. Are there any map file options that might improve
performance? Could it be that Geoserver simply has a faster
implementation for traversing the quadtree?
I look forward to your thoughts.
Brock
More information about the MapServer-users
mailing list