[Gdal-dev] OGR VRT performance through ODBC...

John Cole john.cole at uai.com
Sun Mar 18 09:47:33 EDT 2007


Frank,

  Adding the table name to the connection string did the trick!  A postgres
layer is now just over twice as fast as mssql spatial:

msDrawMap(): Layer 2 (properties_aca), 0.046s 
msDrawMap(): Layer 4 (mssql), 0.110s

Thanks!!

John

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Saturday, March 17, 2007 5:44 PM
To: John Cole
Cc: 'gdal-dev at lists.maptools.org'
Subject: Re: [Gdal-dev] OGR VRT performance through ODBC...

John Cole wrote:
> Frank,
>   Running ogrinfo takes more than 2 seconds to return a few rows (<10),
> though I'm not doing any precise timing.  I didn't see an option to print
> out any performance statistics.
> 
> I was hoping there might be some tuning I could do on the ODBC driver to
> improve the speed.

John,

OK, so we know it isn't something about MapServer.  The next thing I wonder
is how much is "connection cost".  You can likely establish this by just
doing ogrinfo on your .vrt without any request for specific layers and their
features.  If that is also slow, then the ODBC connection cost is high.
This
isn't something you would see from the mssql sql shell since it is "paid"
once at connection time.

We should also ensure the issue isn't the VRT driver.  You can verify this
by doing something like:

  ogrinfo -ro ODBC:mapserver at HUDPLS -sql 'all your sql'

Hmm, thinking about it a bit, I suspect the problem is that when OGR
connects
to an ODBC provider it tries to create layer information about all the
layers
on that database.  If you have lots of tables, potentially even system
tables,
that could be quite substantial.  The way around this is to list the
specific
tables you wanted enumerated.  Since you are using an sql statement you
don't
need any, but I think you need at least one.

Try using an ODBC connection string like:
   ODBC:mapserver at HUDPLS,<sometablename>

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    | President OSGeo, http://osgeo.org

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.12/724 - Release Date: 3/16/2007
12:12 PM
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.13/725 - Release Date: 3/17/2007
12:33 PM
 
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



More information about the Gdal-dev mailing list