pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kouber Saparev <kouber@saparev.com>
To: pgsql-performance@postgresql.org
Subject: Re: LIMIT confuses the planner
Date: Mon, 23 Feb 2009 20:44:22 +0200
Message-ID: <49A2EE86.5070805@saparev.com> (raw)
In-Reply-To: <3562.1235401789@sss.pgh.pa.us>
References: <49A295F0.5010405@saparev.com>
	<603c8f070902230653v346f5b5cm6aeceedce7903f5@mail.gmail.com>
	<3562.1235401789@sss.pgh.pa.us>

Tom Lane wrote:
> 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.

So I've set it wrong, I guess. :-)

Now I put it to:

seq_page_cost = 1
random_page_cost = 2

Regards,
-- 
Kouber Saparev
http://kouber.saparev.com



view thread (14+ messages)  latest in thread

Message-ID: <49A2EE86.5070805@saparev.com>
Permalink:  ../49A2EE86.5070805@saparev.com/
Also on:    postgresql.org/message-id/49A2EE86.5070805@saparev.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: kouber@saparev.com
  Subject: Re: LIMIT confuses the planner
  In-Reply-To: <49A2EE86.5070805@saparev.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