pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Gregory Stark <stark@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: jd@commandprompt.com <jd@commandprompt.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Greg Smith <gsmith@gregsmith.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: benchmarking the query planner
Date: Fri, 12 Dec 2008 19:19:16 +0000
Message-ID: <1229109556.8673.96.camel@ebony.2ndQuadrant> (raw)
In-Reply-To: <8333.1229107388@sss.pgh.pa.us>
References: <603c8f070812061019r5aca3aajeaa5493b11c5feff@mail.gmail.com>
	<603c8f070812092025k6325e0fcud001b205a507a634@mail.gmail.com>
	<4313.1228931932@sss.pgh.pa.us>
	<603c8f070812101828p1bd7df49yb8c916adedb49fe1@mail.gmail.com>
	<9565.1229018968@sss.pgh.pa.us>
	<1229033073.13078.179.camel@hp_dx2400_1>
	<87ej0etkfh.fsf@oxford.xeocode.com>
	<1229039044.13078.193.camel@hp_dx2400_1>
	<4136ffa0812111823u645b6ec9wdca60b3da4b00499@mail.gmail.com>
	<1229072675.13078.196.camel@hp_dx2400_1>
	<603c8f070812120344m67ef2c1fs41806cfb4ff9e396@mail.gmail.com>
	<1229093975.13078.275.camel@ebony.2ndQuadrant>
	<87tz99s7bu.fsf@oxford.xeocode.com>
	<1229100057.8673.29.camel@ebony.2ndQuadrant>
	<8020.1229105929@sss.pgh.pa.us>
	<1229106717.8673.88.camel@ebony.2ndQuadrant>
	<8333.1229107388@sss.pgh.pa.us>


On Fri, 2008-12-12 at 13:43 -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > On Fri, 2008-12-12 at 13:18 -0500, Tom Lane wrote:
> >> Could we skip the hyperbole please?
> 
> > Some of the ndistinct values are very badly off, and in the common cases
> > I cited previously, consistently so.
> 
> > Once I'm certain the rescue helicopter has seen me, I'll stop waving my
> > arms. (But yes, OK).
> 
> Well, AFAICT we have agreed in this thread to kick up the default and
> maximum stats targets by a factor of 10 for 8.4.  If there's anything
> to your thesis that a bigger sample size will help, that should already
> make a noticeable difference.  

That only makes x10 sample size. Since we're using such a low sample
size already, it won't make much difference to ndistinct. It will be
great for histograms and MCVs though.

Please review my detailed test results mentioned here
http://archives.postgresql.org/pgsql-hackers/2006-01/msg00153.php

If you reproduce those results you'll see that the ndistinct machinery
is fundamentally broken for clustered data on large tables. In many
cases those are join keys and so joins are badly handled on the very
tables where good optimisation is most important.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support




view thread (89+ messages)  latest in thread

Message-ID: <1229109556.8673.96.camel@ebony.2ndQuadrant>
Permalink:  ../1229109556.8673.96.camel@ebony.2ndQuadrant/
Also on:    postgresql.org/message-id/1229109556.8673.96.camel@ebony.2ndQuadrant

 · 

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-hackers@postgresql.org
  Cc: simon@2ndQuadrant.com, tgl@sss.pgh.pa.us, stark@enterprisedb.com, robertmhaas@gmail.com, Kevin.Grittner@wicourts.gov, jd@commandprompt.com, josh@agliodbs.com, gsmith@gregsmith.com
  Subject: Re: benchmarking the query planner
  In-Reply-To: <1229109556.8673.96.camel@ebony.2ndQuadrant>

* 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