Re: Is clustering factor stored in pg_stats.correlation?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: AlexK987 <alex(dot)cue(dot)987(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is clustering factor stored in pg_stats.correlation?
Date: 2014-12-20 23:28:51
Message-ID: 11526.1419118131@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

AlexK987 <alex(dot)cue(dot)987(at)gmail(dot)com> writes:
> I believe that tables' clustering factors are stored in pg_stats.correlation.

Dunno what you mean by "clustering factor", but pg_stats.correlation
stores the correlation coefficient between the sequence of the column's
data values and the sequence of their physical order. Correlation
coefficient is defined in the usual way:
http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient
so it ranges between +1 in your example (perfect ordering) and -1
(perfect descending order).

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message AlexK987 2014-12-21 00:43:06 Re: Is clustering factor stored in pg_stats.correlation?
Previous Message AlexK987 2014-12-20 22:59:03 Is clustering factor stored in pg_stats.correlation?