From: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
Cc: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Use extended statistics to estimate (Var op Var) clauses |
Date: | 2021-12-13 02:50:22 |
Message-ID: | CALNJ-vQEPk6j2heB1_RicdfnrmQyLuaWbH_o5ZXjEWMR0nHo0Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Dec 12, 2021 at 6:04 PM Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
wrote:
> On 8/31/21 00:14, Zhihong Yu wrote:
> > Hi,
> > For patch 0002,
> >
> > + s1 = statext_clauselist_selectivity(root, clauses,
> > varRelid,
> > + jointype,
> > sjinfo, rel,
> > +
> > &estimatedclauses, false);
> > +
> > + estimated = (bms_num_members(estimatedclauses) == 1);
> >
> > I took a look at clauselist_apply_dependencies() (called by
> > statext_clauselist_selectivity) where estimatedclauses is modified.
> > Since the caller would not use the returned Selectivity if number of
> > elements in estimatedclauses is greater than 1, I wonder
> > if a parameter can be added to clauselist_apply_dependencies() which
> > indicates early return if the second element is added
> to estimatedclauses.
> >
>
> Hmmm, I'm not sure I understand your point. Are you suggesting there's a
> bug in not updating the bitmap, or would this be an optimization? Can
> you give an example of a query affected by this?
>
> Hi,
My previous comment was from 3 months ago - let me see if I can come up
with an example.
Cheers
>
> regards
>
> --
> Tomas Vondra
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2021-12-13 02:58:08 | Re: Skipping logical replication transactions on subscriber side |
Previous Message | Tomas Vondra | 2021-12-13 02:21:38 | Re: Use extended statistics to estimate (Var op Var) clauses |