Hi Stepan: The query performance improvements for the database drivers come 
from referring to features within a result set as we process query results. 
Previously, we referred to features globally and that is terribly inefficient 
in some cases, and that's why the old query files stored global feature 
indexes. Under the new querying scheme this simply won't work without the 
underlying query result set. The new scheme stores information necessary to 
redo a query and nothing more.

How you might recreate the old approach with MapScript 5.6.1 depends on your 
data store. With shapefiles, the index values stored in a result cache are 
suitable for use msQueryByIndex() as is. With a database source you need to 
work with a primary key and are probably best off working through 
msQueryByAttribute() instead. Perhaps Paul Ramsey can comment on whether or not 
the overall row number is somehow retrievable from a query result so that 
msQueryByIndex() could indeed be used, I don't think it is. In either case 
you'd need to serialize/unserialize your result list or hash yourself, 
msSaveQuery()/msLoadQuery() doesn't do it for you.

Does this help?

Steve

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Thursday, January 14, 2010 12:23 PM
To: [email protected]
Subject: [mapserver-users] new query file format


Dear Steve and all,
  in version 5.6 the query file format has changed to remember last query 
rather than selected records list in previous versions. I used list approach to 
work with selections (add to existing selection XOR etc.), so msQueryByIndex 
was used frequently in mapscript. It seems that new approach doesn't work 
properly with combined and added queries. Is there any reason why it is changed 
now? How the results are stored when I add attribute query to queryByIndex etc. 
?

Thank you

Stepan Kafka
Help Service Remote Sensing
e-mail: [email protected]
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to