X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9553CD1B444 for ; Sat, 3 Jan 2004 22:33:49 +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 83013-07 for ; Sat, 3 Jan 2004 18:33:06 -0400 (AST) Received: from web20804.mail.yahoo.com (web20804.mail.yahoo.com [216.136.226.193]) by svr1.postgresql.org (Postfix) with SMTP id 14833D1C94F for ; Sat, 3 Jan 2004 18:32:59 -0400 (AST) Message-ID: <20040103170625.29952.qmail@web20804.mail.yahoo.com> Received: from [68.107.248.174] by web20804.mail.yahoo.com via HTTP; Sat, 03 Jan 2004 09:06:25 PST Date: Sat, 3 Jan 2004 09:06:25 -0800 (PST) From: Jeff Eckermann Subject: Re: odbc : delay time is too long for pgsql 7.4 ?? To: linusliu Cc: pgsql-odbc@postgresql.org In-Reply-To: <20040103092102.8A71.LINUSLIU@pchome.com.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/4 X-Sequence-Number: 3633 Don't reply to me, you are much more likely to get help on the list. See my few comments below. --- linusliu wrote: > Dear Jeff : > > Thanks for your reply. I try the version 7.3.2 and > 7.4 on the same > machine. And, I use the same progrem for testing. > The ODBC is 7.3.2. ( I > think it is the newest one.) > > About the pgsql, I do nothing but follow the > installation guide to > install it and modify the pg_hba.conf. I do the same > intallation procedure > on 7.2.4 and 7.4 version. I use the pg_dump to move > data from the 7.2.4 version > to the new one. > > The result is : > > 1. the sql : 'select * from where > 1=2' > > 2. if
contains lots of data (143050 > records), the first > time I open the query, the version 7.3.2 & 7.4 : 15 > seconds delay. And > then I reopen the query with the same SQL command : > no delay. I don't > know why. Only the first time has the problem. > > 3. if I oepn a read-only query, no delay. > > 4. if
contains less data (2 records), > no delay. > > If possible, can I install 7.2.4 on RedHat Linux 9 ? > I tried, but failed. > :) > Repeating a query will get you quicker results the second time, because of caching (I don't understand the mechanism, but I know that it works). Hard to tell whether this has anything to do with your ODBC setup, or whether this is entirely a PostgreSQL issue. A couple of things to try: * Make sure to do "vacuum analyze" on your database (and repeat regularly) * Set the "use declare/fetch" option in the ODBC driver settings to true. * Test the same queries from the command line, i.e. psql. If particular queries perform below your expectation, run "explain analyze" on the query, and post the results (with table definitions) to the pgsql-performance list. * Search the list archives using keyword "delphi" for anything that might be relevant for you. Perhaps others on this list can suggest some other things. __________________________________ Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003 http://search.yahoo.com/top2003