Re: Thinking About Correlated Columns (again)

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Craig James <cjames(at)emolecules(dot)com>
Cc: sthomas(at)optionshouse(dot)com, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Thinking About Correlated Columns (again)
Date: 2013-05-15 20:15:02
Message-ID: 5193ECC6.4080901@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 16/05/13 04:23, Craig James wrote:
> On Wed, May 15, 2013 at 8:31 AM, Shaun Thomas
> <sthomas(at)optionshouse(dot)com <mailto:sthomas(at)optionshouse(dot)com>> wrote:
>
> [Inefficient plans for correlated columns] has been a pain point
> for quite a while. While we've had several discussions in the
> area, it always seems to just kinda trail off and eventually
> vanish every time it comes up.
>
[...]
>
> It's a very hard problem. There's no way you can keep statistics
> about all possible correlations since the number of possibilities is
> O(N^2) with the number of columns.
Actually far worse: N!/(N - K)!K! summed over K=1...N, assuming the
order of columns in the correlation is unimportant (otherwise it is N
factorial) - based on my hazy recollection of the relevant maths...

[...]

Cheers,
Gavin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Victor Yegorov 2013-05-15 20:20:43 Re: Effect of the WindowAgg on the Nested Loop
Previous Message eggyknap 2013-05-15 19:23:25 Re: Thinking About Correlated Columns (again)