Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 37638632DA8 for ; Fri, 12 Feb 2010 07:10:47 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 38280-02 for ; Fri, 12 Feb 2010 11:10:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from serveurmail01.codata.be (113.123.146.82.ipv4.evonet.be [82.146.123.113]) by mail.postgresql.org (Postfix) with ESMTP id 8EBDB632230 for ; Fri, 12 Feb 2010 07:10:35 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by serveurmail01.codata.be (Postfix) with ESMTP id 6FB031F3823C for ; Fri, 12 Feb 2010 12:10:32 +0100 (CET) X-Virus-Scanned: amavisd-new at Received: from serveurmail01.codata.be ([127.0.0.1]) by localhost (serveurmail01.codata.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KXqVn66P8qLo for ; Fri, 12 Feb 2010 12:10:25 +0100 (CET) Received: from [127.0.0.1] (38-179-112-217.fix.adsl.belcenter.be [217.112.179.38]) by serveurmail01.codata.be (Postfix) with ESMTP id 7F5551F3822A for ; Fri, 12 Feb 2010 12:10:25 +0100 (CET) Message-ID: <4B753720.9060901@codata.eu> Date: Fri, 12 Feb 2010 12:10:24 +0100 From: Arnaud Lesauvage User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: How to speedup inserts via ADO ? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.085 tagged_above=-10 required=5 tests=BAYES_40=-0.185, RDNS_DYNAMIC=0.1 X-Spam-Level: X-Archive-Number: 201002/4 X-Sequence-Number: 10191 Hi all ! Inserts via ODBC are a lot slower than via native psql connection. For instance, I have a very basic insert statement that inserts one row in a table. If I execute it 1000 times in pgAdmin, it returns in 718ms. If I execute it via ADO (with a direct query : Connection.Execute "INSERT INTO..."), it takes 15s to complete. I checked psqlODBC's commlog, but all I see in it are the INSERT statements that I issued. So there must be a lot of overhead somewhere, but I don't understand where it comes from, and more important I don't understand how I could get rid of it. Are there some connection parameters that I could use to speed things up ? Thanks a lot for helping ! -- Arnaud Lesauvage