Re: cross column correlation revisted - Mailing list pgsql-hackers

From Tom Lane
Subject Re: cross column correlation revisted
Date
Msg-id 4820.1279117321@sss.pgh.pa.us
Whole thread Raw
In response to Re: cross column correlation revisted  (PostgreSQL - Hans-Jürgen Schönig<postgres@cybertec.at>)
Responses Re: cross column correlation revisted
Re: cross column correlation revisted
Re: cross column correlation revisted
List pgsql-hackers
PostgreSQL - Hans-Jürgen Schönig <postgres@cybertec.at> writes:
> i think that having stats on an index is a problem by itself for 2 reasons - for cross column correlation at least:

>     a.) joins cannot be covered by an index on two tables - we would fix "inside a table correlation problems" but
notjoins.
 

Your proposed command didn't cover the two-table case either, and anyway
what the heck do you mean by cross-correlation across tables?
Cross-correlation is about the correlation between values in the same
row.

>     b.) who says that there is actually an index in place?

If the combination of columns is actually interesting, there might well
be an index in place, or the DBA might be willing to create it.  For
that matter, have you considered the idea of examining the index
contents to derive the statistics?  Might work better than trying to get
numbers via ANALYZE.
        regards, tom lane


pgsql-hackers by date:

Previous
From: PostgreSQL - Hans-Jürgen Schönig
Date:
Subject: Re: cross column correlation revisted
Next
From: Andrew Dunstan
Date:
Subject: Re: cross column correlation revisted