[gdal-dev] Re: [mapserver-users] Investigating OpenLayers -> MapServer (WMS) -> OGR -> db

P Kishor punk.kish at gmail.com
Sun Apr 20 08:51:02 EDT 2008


On 4/20/08, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Sat, Apr 19, 2008 at 09:59:56PM +0100, Rob wrote:
>  > Or you could turn tracing on at the database side to see what SQL requests
>  > it receives?  I'm only familiar with oracle, but you could do this in Oracle
>  > using the 'alter system set sql_trace=true' command and checking the udump
>  > directoty for logs.
>  >
>
>
> As I said:
>
>  """
>  In general, this type of logging is done by the 'server' in DB
>  environments: Since SQLIte doesn't *have* a server,
>  """
>


Well, even if true, that answer is not particularly helpful to me,
unfortunately. Fwiw, SQLite *is* the server in the view of many.

My issue is simple -- OpenLayers is sending a CGI query (whether
asking mapserv to respond via CGI or via WMS, I am calling it a CGI
query as it is a query via http). That query string has a param called
BBOX (in the case of OpenLayers.Layer.WMS) or mapext (in the case of
OpenLayers.Layer.MapServer). All I am interested is in the bit of code
that MapServer runs via its OGR driver to extract the data. Since my
DATA string says "SELECT wkt_geometry FROM database", it seems to me
that MapServer is extracting all the rows for every tile that
OpenLayers is requesting. If that is true, that would be very
inefficient. If that is not true, what exactly is MapServer
extracting?

This must be specified somewhere in the code for MapServer/OGR
connection, because, I am assuming, OpenLayers doesn't directly query
the database -- after it hands the right query to MapServer, it simply
waits for whatever data it gets back.

--
Puneet Kishor


More information about the gdal-dev mailing list