pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: kouber@saparev.com
Cc: pgsql-performance@postgresql.org
Subject: Re: LIMIT confuses the planner
Date: Mon, 23 Feb 2009 10:09:49 -0500
Message-ID: <3562.1235401789@sss.pgh.pa.us> (raw)
In-Reply-To: <603c8f070902230653v346f5b5cm6aeceedce7903f5@mail.gmail.com>
References: <49A295F0.5010405@saparev.com>
	<603c8f070902230653v346f5b5cm6aeceedce7903f5@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> If you left seq_page_cost (which isn't mentioned here) at the default
> value but reduced random_page_cost to 0.1, then you have
> random_page_cost < seq_page_cost.  That's probably Bad.

... well, it's certainly going to push the planner to believe indexscans
are cheaper than sorts no matter what.

The previously noted rowcount estimation problem might be a bigger issue
in this particular case, but I agree this is a Bad Idea.

			regards, tom lane



view thread (14+ messages)  latest in thread

Message-ID: <3562.1235401789@sss.pgh.pa.us>
Permalink:  ../3562.1235401789@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3562.1235401789@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, robertmhaas@gmail.com, kouber@saparev.com
  Subject: Re: LIMIT confuses the planner
  In-Reply-To: <3562.1235401789@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