Re: Better default_statistics_target

From: Gregory Stark <stark(at)enterprisedb(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 00:00:30
Message-ID: 878x484rq9.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


"Chris Browne" <cbbrowne(at)acm(dot)org> writes:

> - Any columns marked "unique" could keep to having somewhat smaller
> numbers of bins in the histogram because we know that uniqueness
> will keep values dispersed at least somewhat.

I think you're on the wrong track. It's not dispersal that's significant but
how evenly the values are dispersed. If the values are evenly spread
throughout the region from low to high bound then we just need the single
bucket telling us the low and high bound and how many values there are. If
they're unevenly distributed then we need enough buckets to be able to
distinguish the dense areas from the sparse areas.

Perhaps something like starting with 1 bucket, splitting it into 2, seeing if
the distributions are similar in which case we stop. If not repeat for each
bucket.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-12-06 04:58:52 Uniform policy for author credits in contrib module documentation?
Previous Message S. Horio 2007-12-06 00:00:21 Needs advice on error detection

Browse pgsql-patches by date

  From Date Subject
Next Message Yoshiyuki Asaba 2007-12-06 03:25:00 Wrong result with pgbench -C option?
Previous Message Chris Browne 2007-12-05 20:13:48 Re: Better default_statistics_target