Re: Thinking About Correlated Columns (again) - Mailing list pgsql-performance

From Heikki Linnakangas
Subject Re: Thinking About Correlated Columns (again)
Date
Msg-id 5193AF36.3040409@vmware.com
Whole thread Raw
In response to Thinking About Correlated Columns (again)  (Shaun Thomas <sthomas@optionshouse.com>)
Responses Re: Thinking About Correlated Columns (again)
Re: Thinking About Correlated Columns (again)
Re: Thinking About Correlated Columns (again)
List pgsql-performance
On 15.05.2013 18:31, Shaun Thomas wrote:
> I've seen conversations on this since at least 2005. There were even
> proposed patches every once in a while, but never any consensus. Anyone
> care to comment?

Well, as you said, there has never been any consensus.

There are basically two pieces to the puzzle:

1. What metric do you use to represent correlation between columns?

2. How do use collect that statistic?

Based on the prior discussions, collecting the stats seems to be tricky.
It's not clear for which combinations of columns it should be collected
(all possible combinations? That explodes quickly...), or how it can be
collected without scanning the whole table.

I think it would be pretty straightforward to use such a statistic, once
we have it. So perhaps we should get started by allowing the DBA to set
a correlation metric manually, and use that in the planner.

- Heikki


pgsql-performance by date:

Previous
From: Shaun Thomas
Date:
Subject: Thinking About Correlated Columns (again)
Next
From: Craig James
Date:
Subject: Re: Thinking About Correlated Columns (again)