Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 433AF1337B53 for ; Tue, 21 Dec 2010 16:52:17 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 87105-02 for ; Tue, 21 Dec 2010 20:52:10 +0000 (UTC) X-Greylist: delayed 00:29:49.907726 by SQLgrey-1.7.6 Received: from mercav14.na.sas.com (mercav14.na.sas.com [149.173.6.152]) by mail.postgresql.org (Postfix) with ESMTP id CE9331337B4F for ; Tue, 21 Dec 2010 16:52:09 -0400 (AST) X-TM-IMSS-Message-ID: Received: from [10.28.12.89] ([10.28.12.89]) by mercav14.na.sas.com ([10.19.9.244]) with ESMTP (TREND IMSS SMTP Service 7.0) id b1ad41f4002382a8 ; Tue, 21 Dec 2010 15:22:18 -0500 Message-ID: <4D110C7A.6090103@sas.com> Date: Tue, 21 Dec 2010 15:22:18 -0500 From: Andriy Rysin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: "pgsql-odbc@postgresql.org" Subject: Re: pgsqlodbc 09_00_0200 is twice as slow on inserts as jdbc driver References: <3D66EBA5D043E34AADB194828BD4468F1F0714B1@MERCMBX03D.na.SAS.com> <4D10FBB1.70104@gmail.com> In-Reply-To: <4D10FBB1.70104@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/17 X-Sequence-Number: 10539 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) Andriy