pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: vromanov@gmail.com
To: pgsql-odbc@postgresql.org
Subject: Re: ODBC Driver performance comparison
Date: Fri, 5 Sep 2014 09:40:38 +0300
Message-ID: <54095AE6.2010508@vmware.com> (raw)
In-Reply-To: <CAJ4CROherPrwrJKdNLnN+6B=RdOFmOO7ugbKEFs+GnZ8USSMMQ@mail.gmail.com>
References: <CAJ4CROherPrwrJKdNLnN+6B=RdOFmOO7ugbKEFs+GnZ8USSMMQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 09/05/2014 08:53 AM, Vladimir Romanov wrote:
> Hello all!
> I do some test with ODBC driver for PosgreSql, TimesTen & MySQL. I compare
> performance on very simple request. Database always located on same PC as
> test application. Test PC - Lenovo T500, Cnetos 6.5 64, 8 Gb RAM, SSD.
> I found what PostgreSql ODBC driver is slowest in comparison.
> IMHO problems related to protocol used. I can't use SHM connection to
> server or even UNIX socket.

Actually, you can use a UNIX domain socket with psqlodbc. Just put the 
path to the socket, e.g. "/tmp", in the Servername property, instead of 
the hostname. That's assuming psqlodbc was compiled with libpq support, 
(--with-libpq configure option), but I'm pretty sure that's the default 
on all major distributions.

> perftool report - http://freepcrf.com/files/db_test_pq.pdf

Would be interesting to get the psqlodbc function names in the chart. 
Any chance you could re-run the benchmark with a debug-enabled build?

It's interesting that 10.7% of the runtime seems to be spent in 
__tz_convert() function, called indirectly by SQLExecute. Off the top of 
my head, I don't see where that call is coming from. I wouldn't expect 
SQLExecute to do much with timezones, at least when there are no 
timestamp fields involved.

It might also be fairly straightforward to optimize the sprintf/sscanf 
function calls. They're probably used to convert between integers and 
strings, and it should be possible write some sort of fast-paths for 
those conversions.

Are you measuring wall-clock time or CPU time? If it's CPU time, I'm 
surprised that the I/O-related syscalls, poll(), send() and recv(), are 
so high on the profile. If not, there isn't much you can do in the 
client side to make them faster, as the time is simply spent waiting for 
the server.

- Heikki


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



view thread (4+ messages)  latest in thread

Message-ID: <54095AE6.2010508@vmware.com>
Permalink:  ../54095AE6.2010508@vmware.com/
Also on:    postgresql.org/message-id/54095AE6.2010508@vmware.com

 · 

reply

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: hlinnakangas@vmware.com, vromanov@gmail.com
  Subject: Re: ODBC Driver performance comparison
  In-Reply-To: <54095AE6.2010508@vmware.com>
  References: <CAJ4CROherPrwrJKdNLnN+6B=RdOFmOO7ugbKEFs+GnZ8USSMMQ@mail.gmail.com> <54095AE6.2010508@vmware.com>

* 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