Re: odbc vs. libpq performance

From: "Vilches, Alejandro" <alejandro(dot)vilches(at)intel(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, "'pgsql-odbc(at)postgresql(dot)org'" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: odbc vs. libpq performance
Date: 2015-08-05 00:04:57
Message-ID: 9CE034E149417949A58AA9A4FA7E1C5584AF2B48@ORSMSX109.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

(Sorry, didn't reply to the mailing list initially.)

Oh, great! Thanks for letting me know!

Now, even when setting auto commit to off, performance is still significantly lower (compared to libpq). For example, running the sample program I provided earlier on my machine (and setting auto commit to off), I'm a getting ~100 transactions per second. I did see an improvement compared to before (when I wasn't able to set auto commit to off) as I was only getting ~4 transactions per second. However, if I change the program to use libpq, I get ~1400 transactions per second. I was expecting to see better performance, but the difference shouldn't be too significant, right? What performance difference should I expect when using ODBC vs libpq?

Thanks!
Alejandro

-----Original Message-----
From: Heikki Linnakangas [mailto:hlinnaka(at)gmail(dot)com] On Behalf Of Heikki Linnakangas
Sent: Saturday, August 1, 2015 11:07 AM
To: Vilches, Alejandro; 'pgsql-odbc(at)postgresql(dot)org'
Subject: Re: [ODBC] odbc vs. libpq performance

On 07/31/2015 02:33 AM, Vilches, Alejandro wrote:
> I've continued looking into this and I discovered something: I figured
> out how to successfully set the SQL_ATTR_AUTOCOMMIT attribute to off.
> If you set it prior to establishing the connection, this setting is
> ignored and it defaults to on. If you set it after establishing the
> connection, then it does recognize the setting and it works as
> specified.
>
> The ODBC documentation specifies that this attribute can be set either
> before or after establishing the connection. If it's not accepting
> the setting before establishing the connection, is this an issue in
> the PostgreSQL ODBC driver?

A-ha! Yes, that's a bug in the driver. In fact, it was fixed back in
January:

http://www.postgresql.org/message-id/BY1PR0401MB143087AD121D0251C00E5045A85B0@BY1PR0401MB1430.namprd04.prod.outlook.com

That fix will be included in the next release.

- Heikki

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message scottkensai 2015-08-07 19:56:17 Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client
Previous Message Heikki Linnakangas 2015-08-04 07:16:55 Re: [BUGS] BUG #13536: SQLParamData thows "Invalid Endian" error