| From: | Hannu Krosing <hannu(at)tm(dot)ee> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Philip Warner <pjw(at)rhyme(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: RFC: planner statistics in 7.2 |
| Date: | 2001-04-23 15:32:44 |
| Message-ID: | 3AE44B1C.8060602@tm.ee |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
> Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
>
>> What I'm suggesting is that if you look at a random sample of index nodes,
>> you should be able to get a statistically valid estimate of the 'clumping'
>> of the data pointed to by the index.
>
>
> And I'm saying that you don't actually have to look at the index in
> order to compute the very same estimate. The only property of the index
> that matters is its sort order; if you assume you know the right sort
> order (and in practice there's usually only one interesting possibility
> for a column) then you can compute the correlation just by looking at
> the table.
This is more true for unique indexes than for non-unique ones unless
our non-unique indexes are smart enough to insert equal index nodes in
table order .
> Andreas correctly points out that this approach doesn't extend very well
> to multi-column or functional indexes, but I'm willing to punt on those
> for the time being ...
----------
Hannu
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2001-04-23 15:34:55 | Re: Re: How to determine if a user exists.. |
| Previous Message | Adam Rose | 2001-04-23 14:41:58 | row name length |