Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XPnCc-0004yb-Dq for pgsql-odbc@arkaria.postgresql.org; Fri, 05 Sep 2014 06:40:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XPnCb-00052Q-BR for pgsql-odbc@arkaria.postgresql.org; Fri, 05 Sep 2014 06:40:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XPnCa-00052J-IG for pgsql-odbc@postgresql.org; Fri, 05 Sep 2014 06:40:56 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XPnCT-0007NA-Vu for pgsql-odbc@postgresql.org; Fri, 05 Sep 2014 06:40:54 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id B97FB28E66; Thu, 4 Sep 2014 23:40:44 -0700 (PDT) Received: from EX13-CAS-003.vmware.com (EX13-CAS-003.vmware.com [10.113.191.53]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id B57DCB1064; Thu, 4 Sep 2014 23:40:44 -0700 (PDT) Received: from EX13-MBX-024.vmware.com (10.113.191.44) by EX13-MBX-011.vmware.com (10.113.191.31) with Microsoft SMTP Server (TLS) id 15.0.775.38; Thu, 4 Sep 2014 23:40:44 -0700 Received: from [192.168.1.90] (10.113.160.246) by EX13-MBX-024.vmware.com (10.113.191.44) with Microsoft SMTP Server (TLS) id 15.0.775.38; Thu, 4 Sep 2014 23:40:43 -0700 Message-ID: <54095AE6.2010508@vmware.com> Date: Fri, 5 Sep 2014 09:40:38 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0 MIME-Version: 1.0 To: , Subject: Re: ODBC Driver performance comparison References: In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.113.160.246] X-ClientProxiedBy: EX13-CAS-013.vmware.com (10.113.191.65) To EX13-MBX-024.vmware.com (10.113.191.44) X-Pg-Spam-Score: -9.1 (---------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org 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