Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 2C6239FB276 for ; Mon, 2 Jul 2007 10:30:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 92115-03 for ; Mon, 2 Jul 2007 10:30:07 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id 593329FB912 for ; Mon, 2 Jul 2007 10:30:07 -0300 (ADT) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1I5Lyc-0001sm-TT for pgsql-performance@postgresql.org; Mon, 02 Jul 2007 15:30:02 +0200 Received: from cpe.atm2-0-1261189.0x503fa7b2.bynxx8.customer.tele.dk ([80.63.167.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Jul 2007 15:30:02 +0200 Received: from nis by cpe.atm2-0-1261189.0x503fa7b2.bynxx8.customer.tele.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Jul 2007 15:30:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: =?ISO-8859-1?Q?Nis_J=F8rgensen?= Subject: Re: slow query Date: Mon, 02 Jul 2007 15:20:37 +0200 Lines: 31 Message-ID: References: <919b7db60707020304p75e80e3av3ea79d1951989ffe@mail.gmail.com> <919b7db60707020307x75a347a5v1051e434b0e583d9@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: cpe.atm2-0-1261189.0x503fa7b2.bynxx8.customer.tele.dk User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) In-Reply-To: <919b7db60707020307x75a347a5v1051e434b0e583d9@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/3 X-Sequence-Number: 25687 Vidhya Bondre skrev: > Hi all, > > I need a very urgent help from you all in below case. > > I have a query [snipped] > after vacuuming the db it has become very very slow ... 100 times slow. > > Please suggest ? Suggestions for getting more/better responses: - Format your query nicely before posting it. - Post the relevant table definitions, including indices - Tell us what the query is supposed to do. Suggestions for finding the cause of your problem: - Run "EXPLAIN ANALYZE" on the query. - Try to "remove bits" of the query to see which bits slow it down - try to find a "minimal query" which shows the performance problem. If you can, use the output of "EXPLAIN ANALYZE" obtained above. For instance, all the SUMs in the SELECT clause are unlikely to significantly affect the running time. - Run "EXPLAIN ANALYZE" on the "minimal query", post the results. Nis