Re: 7.2.1 optimises very badly against 7.2

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sam Liddicott <sam(dot)liddicott(at)ananova(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: 7.2.1 optimises very badly against 7.2
Date: 2002-07-12 21:20:53
Message-ID: Pine.LNX.4.44.0207121512520.11521-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 12 Jul 2002, Tom Lane wrote:

> "Sam Liddicott" <sam(dot)liddicott(at)ananova(dot)com> writes:
> > Do you feel the random page cost of 3 is good to solve this?
>
> For the moment, anyway. There have been a couple of rounds of
> pgsql-hackers discussion about whether to lower the default value of
> random_page_cost, but so far no one has done any experiments that
> would be needed to establish a good new value. (The current default
> of 4.0 is based on some old experiments I did. I'm quite willing to
> accept that those experiments might have been flawed, but not willing
> to replace the number without seeing better experiments...)

When I first started using the 7.x series, the query planner often picked
a sequential scan that would take minutes to return, when an index scan
would take seconds. A very low setting for random page cost would fix
this (a setting of 0.1 or something like that) but would also make the
planner make some bad choices where it should be picking a seq scan but
didn't.

With 7.2 I've found that a random page cost of around 2 to 4 seems to work
very well.

So, my point (and I have one!) is that previous experiences with random
page cost and older versions of postgresql don't necessarily apply to
postgresql 7.2.1. Also, if you're having problems with the query planner
and you're running a version of postgresql from before 7.2, you should
upgrade first, then worry about what random page cost should be set to.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message suga 2002-07-12 21:51:40 Re: I am being interviewed by OReilly
Previous Message terry 2002-07-12 20:42:54 looking up field names