Re: Forcing postgresql to use an index

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Eugene Morozov" <eugene(at)cactus-mouse(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Forcing postgresql to use an index
Date: 2009-09-08 16:30:04
Message-ID: 4AA6403C020000250002AB75@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Eugene Morozov <eugene(at)cactus-mouse(dot)com> wrote:

> Can anyone enlighten me? Should I set random_page_cost to 1.2
> permanently (I feel this is not a really good idea in my case)?

For it to pass as many rows as it did in the time that it did, most or
all of the "reads" were cached. If this is typically the case, at
least for the queries for which performance is most critical, your
change makes sense as a permanent setting. In fact, you might want to
go even further -- there have been many reports of people getting good
performance on fully-cached systems by dropping both random_page_cost
and seq_page_cost to 0.1, so that the optimizer better estimates the
relative cost of "disk access" versus CPU-based operations.

-Kevin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2009-09-08 17:25:46 Re: Forcing postgresql to use an index
Previous Message Eugene Morozov 2009-09-08 16:00:25 Re: Forcing postgresql to use an index