X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 79D103A535B for ; Mon, 22 Nov 2004 19:59:18 +0000 (GMT) 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 55160-04 for ; Mon, 22 Nov 2004 19:59:11 +0000 (GMT) Received: from quasar.skima.is (quasar.skima.is [212.30.200.205]) by svr1.postgresql.org (Postfix) with ESMTP id 3461D3A5366 for ; Mon, 22 Nov 2004 19:59:10 +0000 (GMT) Received: from wp2000 ([157.157.160.117] [157.157.160.117]) by quasar.skima.is; Mon, 22 Nov 2004 19:59:04 Z Message-Id: <013401c4d0ce$15e276e0$0100000a@wp2000> From: "gnari" To: "sarlav kumar" , References: <20041122194125.8040.qmail@web51302.mail.yahoo.com> Subject: Re: help needed -- sequential scan problem Date: Mon, 22 Nov 2004 20:01:42 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/335 X-Sequence-Number: 9289 From: "sarlav kumar" > [Tom:] > >You might get some results from increasing the > >statistics target for merchant_purchase.merchant_id. > > Do I have to use vacuum analyze to update the statistics? If so, I have already tried that and it doesn't seem to help. alter table merchant_purchase alter column merchant_id set statistics 500; analyze merchant_purchase; > > >If that doesn't help, I'd think about reducing random_page_cost a little bit. > > I am sorry, I am not aware of what random_page_cost is, as I am new to Postgres. What does it signify and how do I reduce random_page_cost? set random_page_cost = 3; explain analyse if it is an improvement, consider setting the value in your postgresql.conf, but remember that this may affect other queries too. gnari