Re: help needed -- sequential scan problem

From: "gnari" <gnari(at)simnet(dot)is>
To: "sarlav kumar" <sarlavk(at)yahoo(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: help needed -- sequential scan problem
Date: 2004-11-22 20:01:42
Message-ID: 013401c4d0ce$15e276e0$0100000a@wp2000
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

From: "sarlav kumar" <sarlavk(at)yahoo(dot)com>

> [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 <query>

if it is an improvement, consider setting the value in your postgresql.conf,
but remember that this may affect other queries too.

gnari

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Alexandre Leclerc 2004-11-22 20:32:40 Data type to use for primary key
Previous Message sarlav kumar 2004-11-22 19:58:01 Re: help needed -- sequential scan problem