Re: Cross-column statistics revisited

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Joshua Tolley" <eggyknap(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cross-column statistics revisited
Date: 2008-10-15 13:51:37
Message-ID: 871vyiarva.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Joshua Tolley" <eggyknap(at)gmail(dot)com> writes:

> I've been interested in what it would take to start tracking
> cross-column statistics. A review of the mailing lists as linked from
> the TODO item on the subject [1] suggests the following concerns:
>
> 1) What information exactly would be tracked?
> 2) How would it be kept from exploding in size?
> 3) For which combinations of columns would statistics be kept?

I think then you have

4) How would we form estimates from these stats

> The major concern in #1 seemed to be that the most suitable form for
> keeping most common value lists, histograms, etc. is in an array, and
> at the time of the posts I read, arrays of composite types weren't
> possible. This seems much less of a concern now -- perhaps in greatest
> part because a test I just did against a recent 8.4devel sure makes it
> look like stats on composite type columns aren't even kept. The most
> straightforward is that we'd keep a simple multi-dimensional
> histogram, but that leads to a discussion of #2.

"multi-dimensional histogram" isn't such a simple concept, at least not to me.

Histograms aren't a bar chart of equal widths and various heights like I was
taught in school. They're actually bars of various widths arranged such that
they all of the same heights.

It's not clear how to extend that concept into two dimensions. I imagine
there's research on this though. What do the GIST statistics functions store?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-10-15 13:55:54 Re: Updates of SE-PostgreSQL 8.4devel patches
Previous Message Andrew Dunstan 2008-10-15 13:16:38 Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED