Re: Sub-optimal plan chosen

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: tv(at)fuzzy(dot)cz
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Sub-optimal plan chosen
Date: 2009-09-10 16:57:03
Message-ID: 603c8f070909100957l65a0f278o152cf22a685f8f9e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

2009/9/10 <tv(at)fuzzy(dot)cz>:
>> Playing around with seq_page_cost (1) and random_page_cost (1), I can get
>> the correct index selected. Applying those same settings to our production
>> server does not produce the optimal plan, though.
>
> I doubt setting seq_page_cost and random_page_cost to the same value is
> reasonable - random access is almost always more expensive than sequential
> access.

If the data figures to be read from the OS cache, it's very
reasonable, and the right value is somewhere in the 0.05 - 0.10 range.

...Robert

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message bricklen 2009-09-10 17:01:10 Re: Sub-optimal plan chosen
Previous Message bricklen 2009-09-10 16:56:36 Re: Sub-optimal plan chosen