From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Mark Dilger <hornschnorter@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Using multiple extended statistics for estimates
Date: Mon, 9 Dec 2019 23:00:17 +0100
Message-ID: <20191209220017.6eidna5ai7z2wdf5@development> (raw)
In-Reply-To: <1cf520f8-8953-0f16-4794-c9a001e3e436@gmail.com>
References: <20191113152823.jdpertc73gfo2mk7@development>
<2e183f8d-1304-6024-90de-1017a861a235@gmail.com>
<20191114155541.zliellgi2if4bb5f@development>
<e41167d8-53cd-0f18-9301-85fd9a70d8d8@gmail.com>
<20191114200420.c3x2jf7ywzs23uzo@development>
<e9b8a0a2-024c-8819-ca09-9773d3719844@gmail.com>
<20191201190858.oielyi5rpfg5mc23@development>
<20191205171554.leclyueirbwun7dp@development>
<20191205175145.vlqw6c6h2ztiimy2@development>
<1cf520f8-8953-0f16-4794-c9a001e3e436@gmail.com>
On Mon, Dec 09, 2019 at 11:56:39AM -0800, Mark Dilger wrote:
>
>
>On 12/5/19 9:51 AM, Tomas Vondra wrote:
>>On Thu, Dec 05, 2019 at 06:15:54PM +0100, Tomas Vondra wrote:
>>>On Sun, Dec 01, 2019 at 08:08:58PM +0100, Tomas Vondra wrote:
>>>>On Sat, Nov 30, 2019 at 03:01:31PM -0800, Mark Dilger wrote:
>>>>>
>>>>>Are you planning to submit a revised patch for this?
>>>>>
>>>>
>>>>Yes, I'll submit a rebased version of this patch shortly. I got broken
>>>>because of the recent fix in choose_best_statistics, shouldn't take long
>>>>to update the patch. I do have a couple more related patches in the
>>>>queue, so I want to submit them all at once.
>>>>
>>>
>>>OK, here we go - these two patched allow applying multiple extended
>>>statistics, both for MCV and functional dependencies. Functional
>>>dependencies are simply merged and then applied at once (so withouth
>>>choose_best_statistics), statistics are considered in greedy manner by
>>>calling choose_best_statistics in a loop.
>>>
>>
>>OK, this time with the patches actually attached ;-)
>
>These look good to me. I added extra tests (not included in this email)
>to verify the code on more interesting test cases, such as partitioned
>tables and within joins. Your test cases are pretty trivial, just being
>selects from a single table.
>
Adding such more complex tests seem like a good idea, maybe you'd like
to share them?
>I'll go mark this "ready for committer".
>
Thanks for the review. I'll hold-off with the commit until the next CF,
though, just to give others a proper opportunity to look at it.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, hornschnorter@gmail.com
Subject: Re: Using multiple extended statistics for estimates
In-Reply-To: <20191209220017.6eidna5ai7z2wdf5@development>
References: <20191113152823.jdpertc73gfo2mk7@development> <2e183f8d-1304-6024-90de-1017a861a235@gmail.com> <20191114155541.zliellgi2if4bb5f@development> <e41167d8-53cd-0f18-9301-85fd9a70d8d8@gmail.com> <20191114200420.c3x2jf7ywzs23uzo@development> <e9b8a0a2-024c-8819-ca09-9773d3719844@gmail.com> <20191201190858.oielyi5rpfg5mc23@development> <20191205171554.leclyueirbwun7dp@development> <20191205175145.vlqw6c6h2ztiimy2@development> <1cf520f8-8953-0f16-4794-c9a001e3e436@gmail.com> <20191209220017.6eidna5ai7z2wdf5@development>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox