[mapserver-dev] Single pass query concerns (RFC-52)

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Tue Mar 9 23:51:43 EST 2010


Hi Tamas: I'd like the other database driver owners to weigh in to since they're supporting 3 access methods at the moment:

  - msLayerNextShape(): sequential row access in a larger result set
  - msLayerGetShape(): random row access based on a unique global row id 
  - msLayerResultsGetShape(): random row access in a larger result set based on a unique local row id

I don't know how the Oracle and PostGIS drivers know to do anything different as the call to msLayerOpen/msLayerWhichShapes() is identical ahead of all 3 of these. I suspect they're not doing anything different. What's the potential performance benefit to doing something special in the SQL Server case? We certainly could add a "context" flag to msLayerWhichShapes() and drivers could choose to make use of it if available... I'd only advocate for that if it were really worth it from a performance perspective (and the SQL Server audience was sufficiently large).

Steve
________________________________________
From: mapserver-dev-bounces at lists.osgeo.org [mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Tamas Szekeres [szekerest at gmail.com]
Sent: Saturday, March 06, 2010 3:05 PM
To: mapserver-dev at lists.osgeo.org
Subject: [mapserver-dev] Single pass query concerns (RFC-52)

Hi All,

I've been thinking about the single pass query implementation in the MSSQL 2008 driver. I would probably implement a block cursor which would provide to access client side rowsets with multiple rows in a randomly fashion (by positioning with SQLSetPos)

Regardless of the approach chosen, it seems I'd have to do something different for the rowsets to support positioning, than the current forward only single row approach. I don't think it would be reasonable to use the same approach in all cases, I would prefer:

1. Using the forward only single row appoach (providing a smaller memory footprint at the driver) for drawing the background maps (with all features in the current extent)
2. Using the block cursor to retrieve the results of a query and implement LayerResultsGetShape (probably keeping a smaller amout of rows in memory) .

Currently we don't have an option to distinguish between the purpose of a particular WhichShapes operation, in this regard I would like to have to have some additional info in either the LayerOpen or the LayerWhichShapes call which would denote whether futher LayerResultsGetShape(s) will be taken into action within the current result set or not.


Any ideas?

Best regards,

Tamas




More information about the mapserver-dev mailing list