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

Re: pgsqlodbc 09_00_0200 is twice as slow on inserts as jdbc driver

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Andriy Rysin <andriy(dot)rysin(at)sas(dot)com>
Cc: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: pgsqlodbc 09_00_0200 is twice as slow on inserts as jdbc driver
Date: 2010-12-21 23:49:50
Message-ID: 4D113D1E.4080405@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
(2010/12/22 5:22), Andriy Rysin wrote:
> On 12/21/2010 2:10 PM, Adrian Klaver wrote:
>> One to thing look at is whether you have logging turned on in ODBC,
>> this really slows things down. In any case I have never found ODBC to
>> be particularly fast in comparison to other interfaces.
> well, the tracing is turned off, but I also found two things:
> 1) the DB server has a bit lower CPU load when using ODBC driver (30% vs
> 35% with jdbc) and the machine running the program has a bit higher CPU
> load with (6-7% vs 5% with jdbc)
> 2) pg_stat_activity shows proper prepared statement when using jdbc,
> something like:
> insert into my_table (col1, col2) values ($1, $2)
> but when I use ODBC driver the statement looks like a non-prepared one:
> insert into my_table (col1, col2) values (2024443, E'MYTEXT1')
>
> I wander if pgsql odbc driver does not support prepared statement (or I
> need to turn some flag on)

Do you call SQLPrepare() for the query?
And are you turning on the *Server side prepare* option?

regards,
Hiroshi Inoue


In response to

Responses

pgsql-odbc by date

Next:From: Andriy RysinDate: 2010-12-22 03:42:22
Subject: Re: pgsqlodbc 09_00_0200 is twice as slow on inserts as jdbc driver
Previous:From: Andriy RysinDate: 2010-12-21 20:22:18
Subject: Re: pgsqlodbc 09_00_0200 is twice as slow on inserts as jdbc driver

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