[Mapserver-dev] Query efficiency
jhart at frw.uva.nl
Wed Mar 3 10:03:37 EST 2004
Steve Lime wrote:
> Hi guys: The issue of query efficiency keeps coming up these days as
> queries are not simply a means to an end. SVG, image maps etc... are
> going to push the current code, especially with non-shapefile
> datasources. I/we need to figure out a way to cache shapes that are part
> of a query result set. We could use the inline feature structures to do
> this but I worry about huge result sets, and/or could consider
> serializing shapes to some high performance format. There are some
> interesting possibilities with the latter. Query caching could be made
> very efficient (e.g. queryfile/savequery CGI options) and that format
> could be useful for regular layers too, kind of like the gd2 format.
> What do folks think?
Just thinking aloud: couldn't you use the TEMPLATE file for that?
Results of a query are sent back to the client via the TEMPLATE. This
normally contains only the information the browser needs to display the
query. If you added another keyword (say SAVEQUERY) with all the
information MapServer needs to redo the query a second time, the client
could resubmit this information and MapServer could do the query much
faster. You get more network traffic, but for small resultsets on large
mapfiles this will outweigh the cost of repeating the original query.
I'm not sure of large result sets: this is more in the way of regular
database systems, and I'm not sure if MapServer CGI should try to
More information about the mapserver-dev