Re: Clustered indexes - When to use them? - Mailing list pgsql-general

From Tom Lane
Subject Re: Clustered indexes - When to use them?
Date
Msg-id 12033.1130974184@sss.pgh.pa.us
Whole thread Raw
In response to Re: Clustered indexes - When to use them?  ("Jim C. Nasby" <jnasby@pervasive.com>)
Responses Problem with array in plpgsql function .. please help :-)  (David Gagnon <dgagnon@siunik.com>)
List pgsql-general
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> That's because unfortunately PostgreSQL only keeps statistics on
> individual columns. There's no stats kept on multi-column indexes; the
> best the planner can do is use the stats for the first column.

That's not what we do at all: we do look at the stats for each column
and combine them.

The deficiency is that we don't have any stats about cross-column
correlations, and therefore must assume that the columns are independent
(in the statistical sense).  This is a poor assumption in the real world.
But it's a lot subtler than "we only consider the first column".

            regards, tom lane

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Replicating databases
Next
From: Bruce Momjian
Date:
Subject: Re: Lock Modes (Documentation)