maps.google.com - Speed

Frank Warmerdam fwarmerdam at GMAIL.COM
Tue Apr 12 06:40:05 PDT 2005


On Apr 12, 2005 8:21 AM, Shanton, James A <James.Shanton2 at nscorp.com> wrote:
> We're using a SQL Server DB, and OGR to access the coordinates to plot our
> items.   Listed below is the info out of the connection file.   Is this
> similar / comparable in speed to a PostGIS database ?
>
> Are there any ways I can speed this up ?    We have indexes on the activity,
> ag_latitude, and ag_longitude columns.
>
> I'm also displaying the activity on the map with different colors, by using
> classitem "atvstatus" listed in the mapfile section below.

Jim,

When accessing ODBC tables through VRT there is no attempt
made to do spatial queries in a smart way.  What happens is that
all records in the ODBC tables are read, converted into features
via the VRT file, and then those outside the spatial rectangle are
discarded before returning the remaining features to MapServer.

This is suitable for modest numbers of features, but does not scale
to large number of features as you may be noteing.   In particular
it is not at all equivelent to using a spatial indexed RDBMS such
as PostGIS or Oracle (with a spatial table).

In theory I could modify the VRT driver in OGR to use a query
restricting the X and Y columns based on the spatial query in
a case like this, but these dual-constraint ranged based queries
are often not all that efficiently handled by RDBMSes even with
the columns indexed.  However, if squeezing additional
performance out of your current configuration is quite important
to you we could talk about me adding such a features on
contract.   I would be willing to add such an optimization for
$800 USD.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list