Skip site navigation (1) Skip section navigation (2)

Slow query through ODBC

From: Arnaud Lesauvage <thewild(at)free(dot)fr>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Slow query through ODBC
Date: 2006-01-23 09:46:24
Message-ID: 43D4A5F0.8060705@free.fr (view raw or flat)
Thread:
Lists: pgsql-odbc
Hi all !

I have a query that runs very fast when executed through pgAdmin 
(~2 seconds), but very slowly through the ODBC driver (~30 
seconds). Both queries are executed from the same workstation on 
the same server.

My workstation is a WinXP Pro, and I use the latest psqlODBC 
driver available as an MSI package (version 8.01.0102).
The server is a PostGreSQL 8.1.2, running on a Win2000 server.

The query is very simple, it returns about 1500 lines, made of 
only one text field, but this field can be very large (it is the 
WKT representation of a spatial object from PostGIS).

I am connecting to the server in a VBA project with a simple 
connectionstring with only default options (I have not found a 
document explaining how to fine tune the odbc driver).
My connectionstring is :
"DRIVER={PostgreSQL 
Unicode};SERVER=myserver;PORT=5432;DATABASE=mydatabase;UID=myuser;PWD=mypass"

I assume that the problem is with the very large field size that 
is returned, but what should I change in my connectionstring to 
make this query run faster ?

Thanks for your help !

--
Arnaud


pgsql-odbc by date

Next:From: Arnaud LesauvageDate: 2006-01-23 09:52:04
Subject: Slow query through ODBC
Previous:From: Ludek FinstrleDate: 2006-01-23 09:06:56
Subject: Re: Odbcapi30.c - 64 bit compiler warning cleanup

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group