pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kaloyan Iliev Iliev <kaloyan@digsys.bg>
Cc: pgsql-performance@postgresql.org
Subject: Re: Change query join order
Date: Fri, 8 Jan 2010 14:55:00 -0500
Message-ID: <603c8f071001081155w3b7b8042s362837542cfbc42b@mail.gmail.com> (raw)
In-Reply-To: <10916.1262978630@sss.pgh.pa.us>
References: <4B47722A.4010502@digsys.bg>
	<9969.1262975223@sss.pgh.pa.us>
	<603c8f071001081101t5c7b26fci407edd8523a7f4a@mail.gmail.com>
	<10916.1262978630@sss.pgh.pa.us>

On Fri, Jan 8, 2010 at 2:23 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If the other plan does turn out to be faster (and I agree with Tom
>> that there is no guarantee of that), then one thing to check is
>> whether seq_page_cost and random_page_cost are set too high.  If the
>> data is all cached, the default values of 4 and 1 are three orders of
>> magnitude too large, and they should also be set to equal rather than
>> unequal values.
>
> Tweaking the cost parameters to suit your local situation is the
> recommended cure for planner misjudgments; but I'd recommend against
> changing them on the basis of only one example.  You could easily
> find yourself making other cases worse.  Get a collection of common
> queries for your app and look at the overall effects.

No argument, and well said -- just trying to point out that the
default values really are FAR too high for people with databases that
fit in OS cache.

...Robert



view thread (5+ messages)

Message-ID: <603c8f071001081155w3b7b8042s362837542cfbc42b@mail.gmail.com>
Permalink:  ../603c8f071001081155w3b7b8042s362837542cfbc42b@mail.gmail.com/
Also on:    postgresql.org/message-id/603c8f071001081155w3b7b8042s362837542cfbc42b@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: robertmhaas@gmail.com, tgl@sss.pgh.pa.us, kaloyan@digsys.bg
  Subject: Re: Change query join order
  In-Reply-To: <603c8f071001081155w3b7b8042s362837542cfbc42b@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox