Re: Fix var_eq_const: sum selectivity of all matching MCV entries instead of stopping at first match

From: ZizhuanLiu X-MAN <44973863(at)qq(dot)com>
To: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>, Damil Shahzad <shahzaddamil(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix var_eq_const: sum selectivity of all matching MCV entries instead of stopping at first match
Date: 2026-08-05 10:44:46
Message-ID: tencent_44887C535AD252F33762C013B721D08E4D0A@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Original
>From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>Date: 2026-07-30 21:39
>To: ZizhuanLiu X-MAN <44973863(at)qq(dot)com>
>Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
>Subject: Re: Fix var_eq_const: sum selectivity of all matching MCV entries instead of stopping at first match

>I think you need a far stronger
>argument for changing the existing tradeoff than "I believe".
Although I have made efforts to implement it, there is still
no satisfactory and acceptable solution available at present.

>That would double the function's runtime on average, without changing
>the results at all in most cases (it could only be different if the
>given operator has different semantics from the equality operator used
>while building the statistics list).
So I agree with Tom’s reasoning.

regards,
--
ZizhuanLiu (X-MAN) 
44973863(at)qq(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dinesh Salve 2026-08-05 10:47:51 Re: explain plans for foreign servers
Previous Message Damil Shahzad 2026-08-05 10:42:05 Re: Fix var_eq_const: sum selectivity of all matching MCV entries instead of stopping at first match