Hi ZizhuanLiu,

Thanks for the update and the spreadsheet. That analysis is helpful.


I agree with the narrowed conclusion full MCV scanning only looks

justified when the column collation is deterministic and the expression

uses a non deterministic collation. In the other cases, keeping the

current first match behavior seems right.


If you post a revised patch that does the full scan only in that case,

I am happy to retest it.


Thanks,

Damil Shahzad

On Wed, 5 Aug 2026 at 15:37, Zizhuan Liu <[email protected]> wrote:

> >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.

Reply via email to