Re: planner costs in "warm cache" tests - Mailing list pgsql-performance

From Tom Lane
Subject Re: planner costs in "warm cache" tests
Date
Msg-id 14644.1275244491@sss.pgh.pa.us
Whole thread Raw
In response to planner costs in "warm cache" tests  (Jesper Krogh <jesper@krogh.cc>)
Responses Re: planner costs in "warm cache" tests  (Jesper Krogh <jesper@krogh.cc>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Jesper Krogh
Date:
Subject: planner costs in "warm cache" tests
Next
From: Brad Nicholson
Date:
Subject: Re: Zeus IOPS