pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <kgrittn@ymail.com>
Cc: Carson, Leonard <lcarson@sdsc.edu>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: views much slower in 9.3 than 8.4
Date: Tue, 7 Apr 2015 18:30:43 -0500
Message-ID: <552468A3.9090004@BlueTreble.com> (raw)
In-Reply-To: <15849.1427730729@sss.pgh.pa.us>
References: <1174.1427562844@sss.pgh.pa.us>
	<1760411806.1238053.1427726764629.JavaMail.yahoo@mail.yahoo.com>
	<15849.1427730729@sss.pgh.pa.us>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 3/30/15 10:52 AM, Tom Lane wrote:
> Kevin Grittner<kgrittn@ymail.com>  writes:
>> >Tom Lane<tgl@sss.pgh.pa.us>  wrote:
>>> >>But the other problem is that the planner considers less-than-1%
>>> >>differences in cost estimates to be "in the noise", which means
>>> >>that it's not going to consider cost differences of less than
>>> >>1480 units in the remaining join steps to be significant.  This
>>> >>is how come we end up with the apparently brain-dead decisions to
>>> >>use seqscans on some of the other tables such as "pi" and "ac":
>>> >>comparing the seqscan to a potential inner indexscan, the total
>>> >>cost of the join is "the same" according to the 1% rule,
>> >The 1% rule itself might be something to add to the R&D list.

> Perhaps.  But it does make for a significant difference in planner speed,
> and I would argue that any case where it really hurts is by definition
> a cost estimation failure somewhere else.

What I wish we had was some way to represent "confidence" in the 
accuracy of a specific plan node, with the goal of avoiding plans that 
cost out slightly cheaper but if we guessed wrong on something will blow 
up spectacularly. Nested loops are an example; if you miscalculate 
either of the sides by very much you can end up with a real mess unless 
the rowcounts were already pretty trivial to begin with.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (10+ messages)

Message-ID: <552468A3.9090004@BlueTreble.com>
Permalink:  ../552468A3.9090004@BlueTreble.com/
Also on:    postgresql.org/message-id/552468A3.9090004@BlueTreble.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: Jim.Nasby@BlueTreble.com, tgl@sss.pgh.pa.us, kgrittn@ymail.com, lcarson@sdsc.edu
  Subject: Re: views much slower in 9.3 than 8.4
  In-Reply-To: <552468A3.9090004@BlueTreble.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