Re: Correlation in cost_index()

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sean Chittenden <sean(at)chittenden(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Correlation in cost_index()
Date: 2003-08-08 23:48:52
Message-ID: k1d8jvs046jckhvjt433lpgkgh6kovl350@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 08 Aug 2003 18:25:41 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:
> Two examples: [...]

One more example:
X Y

A A
a B
A C
b A
B B
b C
C A
c B
C C

Correlation for column X is something less than 1.0, OTOH correlation
for an index on upper(X) is 1.0.

>I don't really see
>a way to do this without actually examining the multi-column ordering
>relationship during ANALYZE.

So did we reach consensus to add a TODO item?

* Compute index correlation on CREATE INDEX and ANALYZE,
use it for index scan cost estimation

Servus
Manfred

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sean Chittenden 2003-08-08 23:53:48 Re: Correlation in cost_index()
Previous Message Manfred Koizar 2003-08-08 23:18:55 Re: Correlation in cost_index()