Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 2490B9FB468 for ; Sat, 21 Oct 2006 13:52:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 88515-07-2 for ; Sat, 21 Oct 2006 16:50:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 194E39FB46A for ; Sat, 21 Oct 2006 13:14:21 -0300 (ADT) Received: from [192.168.1.95] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k9LGEHr4009262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 Oct 2006 09:14:18 -0700 Message-ID: <453A477D.2040307@commandprompt.com> Date: Sat, 21 Oct 2006 09:14:53 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 1.5.0.7 (X11/20060918) MIME-Version: 1.0 To: Merlin Moncure , Carlo Stonebanks , pgsql-performance@postgresql.org, jd@commandprompt.com Subject: Re: Is ODBC that slow? References: <20061021023211.GA20508@alvh.no-ip.org> <20061021160710.GB24558@alvh.no-ip.org> In-Reply-To: <20061021160710.GB24558@alvh.no-ip.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Sat, 21 Oct 2006 09:14:19 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/461 X-Sequence-Number: 21590 > Yeah, but they had to back-off from that plan, and AFAIK it only uses > libpq for the auth stuff and then switch to dealing with the protocol > directly. > > I don't know what the reasoning was though :-) I guess Joshua would > know. I'm not involved in that project. I only know that recently a > user posted some measurements showing that ODBCng was way slower that > psqlODBC, and it was discovered that it was using v3 Prepare/Bind/ > Execute, which was problematic performance-wise due to the planner > issues with that. So AFAIK it currently parses the statements > internally before passing them to the server. That is correct, we were using PostgreSQL server side prepare which has shown to be ridiculously slow. So we moved to client side prepare and ODBCng now moves very, very quickly. You can see results here: http://projects.commandprompt.com/public/odbcng/wiki/Performance As in, it moves quickly enough to compete with other bindings such as DBD::Pg. One of the libpq features we wanted to avoid was the receiving of all results on the server before sending to the client. With ODBCng we have a buffering option that will receive all results over the wire directly. This can increase performance quite a bit in specific circumstances but also has the downside of using more memory on the ODBC client. We also have a security through obscurity feature as described here: http://projects.commandprompt.com/public/odbcng/wiki/PatternMatch Sincerely, Joshua D. Drake -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate