public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrei Lepikhov <[email protected]>
To: Tomas Vondra <[email protected]>
To: Andrei Lepikhov <[email protected]>
To: Andy Fan <[email protected]>
Cc: Julien Rouhaud <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: [email protected]
Cc: Justin Pryzby <[email protected]>
Cc: [email protected]
Subject: Re: using extended statistics to improve join estimates
Date: Tue, 3 Sep 2024 14:58:05 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<20220119101809.wzrjvh4jsnoakgny@jrouhaud>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 17/6/2024 18:10, Tomas Vondra wrote:
> Let me quickly go through the original parts - most of this is already
> in the "review" patches, but it's better to quote the main points here
> to start a discussion. I'll omit some of the smaller suggestions, so
> please look at the 'review' patches.
>
>
> v20240617-0001-Estimate-joins-using-extended-statistics.patch
>
> - rewords a couple comments, particularly for statext_find_matching_mcv
>
> - a couple XXX comments about possibly stale/inaccurate comments
> v20240617-0054-clauselist_selectivity_hook.patch
>
> - I believe this does not work with the earlier patch that removed
> estimatedclaused bitmap from the "try" function.
This patch set is too big to eat at once - it's just challenging to
invent examples and counterexamples. Can we see these two patches in the
master and analyse further improvements based on that?
Some thoughts:
You remove verRelid. I have thought about replacing this value with
RelOptInfo, which would allow extensions (remember selectivity hook) to
know about the underlying path tree.
The first patch is generally ok, and I vote for having it in the master.
However, the most harmful case I see most reports about is parameterised
JOIN on multiple anded clauses. In that case, we have a scan filter on
something like the below:
x = $1 AND y = $2 AND ...
As I see, current patch doesn't resolve this issue currently.
--
regards, Andrei Lepikhov
view thread (8+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: using extended statistics to improve join estimates
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox