Re: help needed -- sequential scan problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "sarlav kumar" <sarlavk@xxxxxxxxx>

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





[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux