Re: help needed -- sequential scan problem - Mailing list pgsql-performance

From gnari
Subject Re: help needed -- sequential scan problem
Date
Msg-id 013401c4d0ce$15e276e0$0100000a@wp2000
Whole thread Raw
In response to Re: help needed -- sequential scan problem  (sarlav kumar <sarlavk@yahoo.com>)
List pgsql-performance
From: "sarlav kumar" <sarlavk@yahoo.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




pgsql-performance by date:

Previous
From: sarlav kumar
Date:
Subject: Re: help needed -- sequential scan problem
Next
From: Alexandre Leclerc
Date:
Subject: Data type to use for primary key