Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0C417B5DBDC for ; Wed, 22 Jun 2011 04:05:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 95978-06 for ; Wed, 22 Jun 2011 07:05:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 6A423B5DBE8 for ; Wed, 22 Jun 2011 04:05:17 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id D715B4B9; Wed, 22 Jun 2011 03:05:16 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14c7Yu9UKVRQ; Wed, 22 Jun 2011 03:05:16 -0400 (EDT) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id F1E7C27; Wed, 22 Jun 2011 03:05:15 -0400 (EDT) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id C80C7AF5A9; Wed, 22 Jun 2011 15:05:14 +0800 (WST) Message-ID: <4E01942A.7000402@postnewspapers.com.au> Date: Wed, 22 Jun 2011 15:05:14 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Thunderbird/3.1.9 MIME-Version: 1.0 To: Tripura CC: pgsql-performance@postgresql.org Subject: Re: Improve the Postgres Query performance References: <1308688479731-4511903.post@n5.nabble.com> In-Reply-To: <1308688479731-4511903.post@n5.nabble.com> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/207 X-Sequence-Number: 44140 On 22/06/11 04:34, Tripura wrote: > Hello All.. > This is my first PostgreSql database. It has 8 tables and 4 tables are very > huge each with 6million records. > I have a simple view on this tables and it is taking more than 3hrs to > return the results. > Can someone help me the way to improve the db return the results in a faster > way. Please read: http://wiki.postgresql.org/wiki/SlowQueryQuestions and post a follow-up with more detail. -- Craig Ringer