Skip site navigation (1) Skip section navigation (2)

Re: Better default_statistics_target

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Better default_statistics_target
Date: 2007-12-06 19:34:42
Message-ID: 1196969682.4255.455.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Wed, 2007-12-05 at 15:13 -0500, Chris Browne wrote:

> I have the theory (thus far not borne out by any numbers) that it
> might be a useful approach to try to go through the DB schema and use
> what information is there to try to come up with better numbers on a
> per-column basis.

Yeh, agreed.

The difficulty is making this work for generic datatypes.

>  - Datestamps tend to imply temporal dispersion, ergo "somewhat fewer
>    bins."  Similar for floats.

Hmmm, not sure about that one. Some date/time columns can change very
quickly over time, so the stats are frequently out of date.

> Then could come a "second order" perspective, where data would
> actually get sampled from pg_statistics.
> 
>  - If we look at the number of distinct histogram bins used, for a
>    particular column, and find that there are some not used, we might
>    drop bins.

The histograms are height balanced, so they are always all used.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


In response to

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-12-06 21:02:21
Subject: Re: [HACKERS] BUG #3799: csvlog skips some logs
Previous:From: Alvaro HerreraDate: 2007-12-06 19:29:21
Subject: Re: shared_buffers, wal_buffers, WAL files, data files

pgsql-patches by date

Next:From: Tom LaneDate: 2007-12-07 00:19:27
Subject: Proposed patch to make mergejoin cost estimation more symmetric
Previous:From: Merlin MoncureDate: 2007-12-06 19:12:22
Subject: Re: PQParam version 0.5

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group