pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jesper Krogh <jesper@krogh.cc>
Cc: pgsql-performance@postgresql.org
Subject: Re: planner costs in "warm cache" tests
Date: Sun, 30 May 2010 14:34:51 -0400
Message-ID: <14644.1275244491@sss.pgh.pa.us> (raw)
In-Reply-To: <4C02A342.40801@krogh.cc>
References: <4C02A342.40801@krogh.cc>

Jesper Krogh <jesper@krogh.cc> writes:
> testdb=# set seq_page_cost = 0.00001;
> SET
> testdb=# set random_page_cost = 0.00001;
> SET

Well, hmm, I really doubt that that represents reality either.  A page
access is by no means "free" even when the page is already in cache.
I don't recall anyone suggesting that you set these numbers to less
than perhaps 0.01.

In the case at hand, the problem is that the planner is preferring using
an indexscan to an after-the-fact sort to obtain the specified result
ordering.  Making page fetches look too cheap definitely plays into
that.  There may also be a statistical problem, if the location of the
desired records isn't independent of the accession_number ordering, but
you're not doing yourself any favors by pushing the planner cost
parameters several orders of magnitude outside the design envelope.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <14644.1275244491@sss.pgh.pa.us>
Permalink:  ../14644.1275244491@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14644.1275244491@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, jesper@krogh.cc
  Subject: Re: planner costs in "warm cache" tests
  In-Reply-To: <14644.1275244491@sss.pgh.pa.us>

* 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