Re: Propose a new hook for mutating the query bounds

From: Xiaozhe Yao <askxzyao(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Subject: Re: Propose a new hook for mutating the query bounds
Date: 2021-11-17 15:39:37
Message-ID: CAAxqZp_NH+aHQ6hO2PwrJSZb=9arPZDt5fueTrHiXASCh0623A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tom,

Thanks for your feedback. I completely agree with you that a higher-level
hook is better suited for this case. I have adjusted the PoC patch to this
email.

Now it is located in the clauselist_selectivity_ext function, where we
first check if the hook is defined. If so, we let the hook estimate the
selectivity and return the result. With this one, I can also develop
extensions to better estimate the selectivity.

I hope it makes more sense. Also please forgive me if I am understanding
Postgres somehow wrong, as I am quite new to this community :)

Best regards,
Xiaozhe

Attachment Content-Type Size
clauselist_selectivity_hook.diff text/x-patch 1.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2021-11-17 15:44:27 Re: Non-superuser subscription owners
Previous Message Dmitry Dolgov 2021-11-17 15:21:44 Re: Keep notnullattrs in RelOptInfo (Was part of UniqueKey patch series)