Re: Extended statistics for correlated columns, row estimates when values are not in MCVs list

From: Michael Lewis <lewis(dot)michaelr(at)gmail(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Extended statistics for correlated columns, row estimates when values are not in MCVs list
Date: 2020-12-10 19:47:46
Message-ID: CAMcsB=wSWvVwkj4NyuKFvyyPK+v0w=an700qUgy2k1Sj7G1raA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Dec 7, 2020 at 8:31 AM Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
wrote:

> What you might try is defining the statistics with only the functional
> dependencies. That should consider the column-level correlation even
> when the combination of values is not in the MCV. It might make the
> "good" estimate worse, but that's an inherent trade-off.
>

Thanks very much. Removing MCVs type works perfectly for my use cases.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2020-12-11 00:36:55 Re: JDBC driver - is "getGeneratedKeys()" guaranteed to return the ids in the same order a batch insert was made?
Previous Message Dirk Mika 2020-12-10 18:33:15 Re: Set COLLATE on a session level