From: Shachar Shemesh <psql@shemesh.biz>
To: jorgens@coho.net <jorgens@coho.net>
Cc: 'pgsql-odbc@postgresql.org' <pgsql-odbc@postgresql.org>
Subject: Re: Performance-problem
Date: Sat, 27 Mar 2004 09:49:48 +0200
Message-ID: <4065321C.8010105@shemesh.biz> (raw)
In-Reply-To: <01C41332.76A65000.jorgens@coho.net>
References: <01C41332.76A65000.jorgens@coho.net>
I've had the exact same issue. I also debugged it until I found out
exactly what the problem was. I didn't have the time to sit down and fix
it, though.
When you open a non-readonly cursor, the ODBC performs a select that has
the oid and ctid fields added in. This is done to bypass the fact that
postgresql has no updateable cursors support.
When you try to actually get the information from the query, each line
you ask for is another select! The performance hit I get compared to the
same query running over SQL Server is 1:10 (sounds familiar?).
The solution:
If you can afford it - make the query readonly. This will make the ODBC
use a regular cursor, and the problem is gone.
If you cannot afford it - the driver will need to be fixed.
What I thought for a fix - add the oid and ctid as before, but make that
a readonly cursor. If and when an update request arrives, do the proper
select as usual.
Shachar
Steve Jorgensen wrote:
>Are you sure the ODBC driver is the culprit in the problem you are having?
> Could it be the speed of the query, or the speed of the network over which
>you are connecting, perhaps? It would help if you describe your issue in
>more detail.
>
>On Wednesday, March 24, 2004 1:59 AM, Maximilian Fuhrer
>[SMTP:m.fuehrer@hm-software.de] wrote:
>
>
>>Hallo,
>>if have a problem with the performance of the ODBC-driver.
>>i need i 10x faster.
>>
>>ODBC driver version :psqlodbc-07_03_0200
>>PostgreSQL database version : 7.3
>>
>>yours faithfully,
>>Maximilian Fuhrer
>> << File: ATT00288.html >>
>>
>>
--
Shachar Shemesh
Lingnu Open Systems Consulting
http://www.lingnu.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: psql@shemesh.biz, jorgens@coho.net
Subject: Re: Performance-problem
In-Reply-To: <4065321C.8010105@shemesh.biz>
References: <01C41332.76A65000.jorgens@coho.net> <4065321C.8010105@shemesh.biz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox