pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Dilger <hornschnorter@gmail.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Using multiple extended statistics for estimates
Date: Mon, 9 Dec 2019 11:56:39 -0800
Message-ID: <1cf520f8-8953-0f16-4794-c9a001e3e436@gmail.com> (raw)
In-Reply-To: <20191205175145.vlqw6c6h2ztiimy2@development>
References: <0da76f1f-5f9c-3ce3-3ac6-042d2a18430a@gmail.com>
	<20191110173428.w5klequcmb6gawaa@development>
	<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>



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.

I'll go mark this "ready for committer".

-- 
Mark Dilger





view thread (26+ messages)  latest in thread

Message-ID: <1cf520f8-8953-0f16-4794-c9a001e3e436@gmail.com>
Permalink:  ../1cf520f8-8953-0f16-4794-c9a001e3e436@gmail.com/
Also on:    postgresql.org/message-id/1cf520f8-8953-0f16-4794-c9a001e3e436@gmail.com

 · 

reply

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: hornschnorter@gmail.com, tomas.vondra@2ndquadrant.com
  Subject: Re: Using multiple extended statistics for estimates
  In-Reply-To: <1cf520f8-8953-0f16-4794-c9a001e3e436@gmail.com>
  References: <0da76f1f-5f9c-3ce3-3ac6-042d2a18430a@gmail.com> <20191110173428.w5klequcmb6gawaa@development> <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>

* 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