X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 96EFED76D5 for ; Tue, 30 Aug 2005 09:34:19 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45584-06 for ; Tue, 30 Aug 2005 12:34:17 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id E1223D6EBD for ; Tue, 30 Aug 2005 09:34:16 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j7UCYG0T024682 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Aug 2005 06:34:18 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j7UCYFIV056203; Tue, 30 Aug 2005 06:34:15 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j7UCYFrc056202; Tue, 30 Aug 2005 06:34:15 -0600 (MDT) (envelope-from mfuhr) Date: Tue, 30 Aug 2005 06:34:14 -0600 From: Michael Fuhr To: Ricky Sutanto Cc: Pgsql-sql@postgresql.org Subject: Re: Performance issue Message-ID: <20050830123414.GB36757@winnie.fuhr.org> References: <43141be5.4f371831.1898.6e6f@mx.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43141be5.4f371831.1898.6e6f@mx.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 required=5 tests=[AWL=0.005] X-Spam-Level: X-Archive-Number: 200508/281 X-Sequence-Number: 22509 On Tue, Aug 30, 2005 at 03:42:06PM +0700, Ricky Sutanto wrote: > I use Apache Web Server and PostgreSQL 7.3 to collect data everyday. Now it > has been 5 month since I install that server. Which release of PostgreSQL 7.3? What operating system and version? > I wonder why now my web very slow to retrieve and display data? Are only web-based applications slow, or are the same queries issued from another client (e.g., psql) also slow? Are you running VACUUM ANALYZE on a regular basis? If not then you might have a lot of dead tuples in your database. In 7.3 you might also want to REINDEX periodically (this isn't as necessary in later versions). For more information, see "Routine Database Maintenance Tasks" in the documentation: http://www.postgresql.org/docs/7.3/static/maintenance.html If queries are still slow after database maintenance then please post the EXPLAIN ANALYZE output of an example query. Additional info like table descriptions and sizes would also be helpful. > When I check the memory, I found that postgreSQL client seem not release > after allocate. I try to find bug on my script, but everything look clean to > me. What client, and what do you mean by "seem not release after allocate"? What are you doing and how are you checking it? What language are you using? BTW, the pgsql-performance list would be more appropriate for discussing performance issues. Pgsql-sql is supposed to be for SQL-related matters (how to write queries, etc.). -- Michael Fuhr