pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-performance@postgresql.org
Cc: Jim C. Nasby <decibel@decibel.org>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: David Brown <time@bigpond.net.au>
Subject: Re: Analyzer is clueless
Date: Wed, 17 Nov 2004 17:41:16 -0800
Message-ID: <200411171741.16515.josh@agliodbs.com> (raw)
In-Reply-To: <20041118002008.GL80532@decibel.org>
References: <20041117160824.B694D3A3ECC@svr1.postgresql.org>
	<1100730768.4113.7709.camel@localhost.localdomain>
	<20041118002008.GL80532@decibel.org>

Jim,

> Is there still a good reason to have the histogram stats so low? Should
> the default be changed to more like 100 at this point?

Low overhead.  This is actually a TODO for me for 8.1.   I need to find some 
test cases to set a differential level of histogram access for indexed 
fields, so like 10 for most fields but 100/150/200 for indexed fields.

However, I got stalled on finding test cases and then ran out of time.

> Also, how extensively does the planner use n_distinct, null_frac,
> reltuples and the histogram to see what the odds are of finding a unique
> value or a low number of values? I've seen cases where it seems the
> planer doesn't think it'll be getting a unique value or a small set of
> values even though stats indicates that it should be.
>
> One final question... would there be interest in a process that would
> dynamically update the histogram settings for tables based on how
> distinct/unique each field was?

Well, the process by which the analyzer decides that a field is unique could 
probably use some troubleshooting.   And we always, always could use 
suggestions/tests/help with the query planner.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco



view thread (7+ messages)  latest in thread

Message-ID: <200411171741.16515.josh@agliodbs.com>
Permalink:  ../200411171741.16515.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200411171741.16515.josh@agliodbs.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: josh@agliodbs.com, decibel@decibel.org, simon@2ndquadrant.com, time@bigpond.net.au
  Subject: Re: Analyzer is clueless
  In-Reply-To: <200411171741.16515.josh@agliodbs.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