pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@mail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: niko.kiirala@mapvision.fi
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7619: Query cost estimate appears to not use n_distinct setting
Date: Wed, 24 Oct 2012 21:56:48 -0400
Message-ID: <20121025015648.306900@gmx.com> (raw)

Tom Lane wrote:

> plus some not-very-large CPU-per-tuple charges

In my experience, cpu_tuple_cost should be higher. I've often had to
boost it to get good plans for a wide mix of queries in a load.
Doubling it to 0.02 is often not enough to get good plans. I've taken
it to 0.05 with production workloads without ill effect, but
personally have not seen further improvements beyond the plans I got
at 0.03. Among other things, this setting tends to make the ratio
between random_page_cost and seq_page_cost somewhat less sensitive;
although I still find it best to take them both down to 0.1 for fully
cached workloads, along with the cpu_tuple_cost boost.

I think we should raise the default for cpu_tuple_cost, but have been
reluctant to suggest it based on just my personal experiences. Has
anyone else found this useful?

-Kevin




view thread (4+ messages)

Message-ID: <20121025015648.306900@gmx.com>
Permalink:  ../20121025015648.306900@gmx.com/
Also on:    postgresql.org/message-id/20121025015648.306900@gmx.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: kgrittn@mail.com, tgl@sss.pgh.pa.us, niko.kiirala@mapvision.fi
  Subject: Re: BUG #7619: Query cost estimate appears to not use n_distinct setting
  In-Reply-To: <20121025015648.306900@gmx.com>
  References: <20121025015648.306900@gmx.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