Re: Extended statistics improvement: multi-column MCV missing values

From: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
To: Enrique Sánchez <enriqueesanchz(at)gmail(dot)com>
Cc: Chengpeng Yan <chengpeng_yan(at)outlook(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Subject: Re: Extended statistics improvement: multi-column MCV missing values
Date: 2026-06-15 21:13:42
Message-ID: 3ccc8ad1-3e84-4d2b-9556-843aded20128@tantorlabs.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6/10/26 03:57, Enrique Sánchez wrote:

> You can check v4-0002.

It's generally not safe to compare floating-point values for equality. I
mean using `mcv_sel == 0.0` to detect that there are no extended MCV
matches. IMO, we should use a bool variable (similar to how
var_eq_const() does it) to track whether any MCV item matched,
specifically in the loop where we check extended MCV matches in
mcv_clauselist_selectivity(), and use that instead of checking `mcv_sel
== 0.0`.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-06-15 21:21:07 Re: Fix unqualified catalog references in psql describe queries
Previous Message Zsolt Parragi 2026-06-15 21:13:29 Re: [PATCH v2] Add ssl_alt_cert_file/ssl_alt_key_file for dual RSA+ECDSA certificate support