X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id EA170D1B507 for ; Sat, 15 Nov 2003 17:56:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 66035-08 for ; Sat, 15 Nov 2003 13:56:12 -0400 (AST) Received: from smtp1.actcom.net.il (mx1.actcom.net.il [192.114.47.13]) by svr1.postgresql.org (Postfix) with ESMTP id D250FD1B4F9 for ; Sat, 15 Nov 2003 13:55:54 -0400 (AST) Received: from shemesh.biz (line102-130.adsl.actcom.co.il [192.117.102.130]) by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id hAFHtpsA007251 for ; Sat, 15 Nov 2003 19:55:52 +0200 Message-ID: <3FB668A7.7060704@shemesh.biz> Date: Sat, 15 Nov 2003 19:55:51 +0200 From: Shachar Shemesh User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3 X-Accept-Language: en, he MIME-Version: 1.0 To: PostgreSQL ODBC Subject: Extreme slowness Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/85 X-Sequence-Number: 3487 Hi all, I am working with a company that is trying to migrate an application to Postgresql. After long last we have passed the setting up stage, and have moved over to the performance testing stage. At the moment, performance when running a long query is 10 times worse for PGSQL than MSDE (both when running on the same machine). When enabling debugging on PostgreSQL, I can see that the query that takes so long translates to several hundred thousands individual queries. The log is full with lines of repeating queries (each in it's own transaction), with slightly varying ctid selectors. The application uses the CRecordSet MFC construct to query the database.I have not delved too deeply into the code, but my understanding of it is that, due to the lack of proper cursors suport, the ODBC driver seperates the process into distinguish queries. This turns the ODBC->server communication into the bottleneck. My questions: 1. Is it true that, when PGSQL 7.4 will be out, the ODBC will allow support of bidirectional updateable cursors? Can anyone give a rough uncommiting time estimate for that once the database is out? 2. Is there a reason each select is in it's own query? I would have though they could have been prepared together? 3. Is there a reason each select is in it's own transaction? Does the ODBC standard require that the data be updated in the query if someone else changes it? Shachar -- Shachar Shemesh Open Source integration consultant Home page & resume - http://www.shemesh.biz/