X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 3DA9311F660E for ; Thu, 27 Apr 2006 15:27:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 06620-05 for ; Thu, 27 Apr 2006 15:27:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from 137086.vserver.de (vs137086.vserver.de [62.75.137.86]) by postgresql.org (Postfix) with ESMTP id 57F2811F6641 for ; Thu, 27 Apr 2006 15:27:37 -0300 (ADT) Received: from a-kretschmer.de (p54B3A7CA.dip0.t-ipconnect.de [84.179.167.202]) (authenticated bits=0) by 137086.vserver.de (8.12.8/8.12.8) with ESMTP id k3RIRTvU015378 for ; Thu, 27 Apr 2006 20:27:31 +0200 Received: from kretschmer by a-kretschmer.de with local (Exim 4.61) (envelope-from ) id 1FZBDz-0008EQ-IF for pgsql-performance@postgresql.org; Thu, 27 Apr 2006 20:28:23 +0200 Date: Thu, 27 Apr 2006 20:28:23 +0200 From: Andreas Kretschmer To: pgsql-performance@postgresql.org Subject: Re: Why so slow? Message-ID: <20060427182823.GA29375@KanotixBox> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: mutt-ng 1.5.9i (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/653 X-Sequence-Number: 18737 Bealach-na Bo schrieb: > The node table is tiny (2500 records). What I'm pulling my hair out > over is that ANY Query, even something as simple as select count(*) > form job_log takes of the order of tens of minutes to complete. Just > now I'm trying to run an explain analyze on the above query, but so > far, it's taken 35min! with no result and there is a postgres process at > the top of top > > What am I doing wrong?? The 'explain analyse' don't return a result, but it returns the query plan and importance details, how PG works. That's why you should paste the query and the 'explain analyse' - output. This is very important. Anyway, do you periodical vacuum your DB? My guess: no, and that's why you have many dead rows. 20:26 < akretschmer|home> ??vacuum 20:26 < rtfm_please> For information about vacuum 20:26 < rtfm_please> see http://developer.postgresql.org/~wieck/vacuum_cost/ 20:26 < rtfm_please> or http://www.postgresql.org/docs/current/static/sql-vacuum.html 20:26 < rtfm_please> or http://www.varlena.com/varlena/GeneralBits/116.php 20:27 < akretschmer|home> ??explain 20:27 < rtfm_please> For information about explain 20:27 < rtfm_please> see http://techdocs.postgresql.org/oscon2005/robert.treat/OSCON_Explaining_Explain_Public.sxi 20:27 < rtfm_please> or http://www.gtsm.com/oscon2003/toc.html 20:27 < rtfm_please> or http://www.postgresql.org/docs/current/static/sql-explain.html Read this links for more informations about vacuum and explain. HTH, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknow) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°