Re: Optimize join selectivity estimation by not reading MCV stats for unique join attributes - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Optimize join selectivity estimation by not reading MCV stats for unique join attributes
Date
Msg-id CAMbWs4_v47mP3VCoqo=7GjL59rDnYPDokCqjHKsJ+gbeRY4bqA@mail.gmail.com
Whole thread Raw
In response to Re: Optimize join selectivity estimation by not reading MCV stats for unique join attributes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Optimize join selectivity estimation by not reading MCV stats for unique join attributes
List pgsql-hackers

On Fri, Nov 18, 2022 at 9:36 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Actually, looking at get_attstatslot, I realize it was already designed
to do that -- just pass zero for flags.  So we could do it as attached.
 
Yes, it is.  Using zero flag would short-cut get_attstatsslot() to just
return whether the slot type exists without loading it.  Do you think we
need to emphasize this use case in the comments for 'flags'?  It seems
currently there is no such use case in the codes on HEAD.

I wonder whether we need to also check statistic_proc_security_check()
when determining if MCVs exists in both sides.

Thanks
Richard

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Strange failure on mamba
Next
From: Amit Kapila
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply