Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFjlb-005UKp-3C for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 02:26:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFjlb-00G2kN-02 for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 02:26:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wFjla-00G2kF-2B for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 02:26:10 +0000 Received: from mail-yx1-xb133.google.com ([2607:f8b0:4864:20::b133]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFjlY-00000002ZU3-1fmR for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 02:26:10 +0000 Received: by mail-yx1-xb133.google.com with SMTP id 956f58d0204a3-65075c2ba66so4502368d50.1 for ; Wed, 22 Apr 2026 19:26:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776911166; cv=none; d=google.com; s=arc-20240605; b=fW+Z9FP7ikrxvuizo5xwDdPYD3pfqsSCABtcFHCR1XEXVzMU2VPqHFQbnjTv9zAxE4 EZvBC8OWIZObid+Yp/72q45JAuQgmDKnW1Qqw2+HWre/MNPZxwjWCGc5xaHf26Mst8rl iXec54okbfXB0Tu0OaVtM3DBwTeJE+XTIZtkhmYVod6l+taVFAUP5FWMVnyteR2iGF/K /KaGkanXIY3CtRprYcNvBRJIVeq9CB5mesQQobxIfxe87hSRHwi37mAPwgBoQsec21mB 1+Fb4DU2hAC+AmtaCle0cFLLMi7iAackHxrmfQnrWFOSyxv4mr1pYgHr+b9IDBMxlsld skFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=WKKG5mUe3JYUX5zwPC5aQIXjrS8/CQIYsmAWT2nljUk=; fh=/nk5O9rXdLviKxf3+YIqWD6bpDbfdePen3dvddQVUxo=; b=Mb/NEdT+mPkHv/CBXTkoa2FMdzOFa88bxY0N/yijOATgR6JrgHrB5ocmC+BjsWzyEX uLu9rd2DQjNmozpV2j8yOCg2COEeSwyGpzdk433Q0lHH2Bvab00EBdttxE4edUoAbM98 gY6o5LH9itH5ZRPj2tgP5/uenKen6DVfUqWsMhyDZQv/W8Q4udKYPzol6T+zDel+ch6P ZRS4j8BA99GUbyF/a7NR59JndFg+FCvaEyqNH377PHNlnGc/G8p7r8AFrxc374dctf9L rWpLEVWPkAKYYT5YSxLK8Kye+qZrODcNllLyMib/KXSRdA7CkH65nEqBxwZupEpCbIj8 FPYg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776911166; x=1777515966; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WKKG5mUe3JYUX5zwPC5aQIXjrS8/CQIYsmAWT2nljUk=; b=h8eUEqupfT3Me7KJXQOV4oGztj6z68ie28Sfi7Hwvd3OfaVV2K8dbCrbYm7/KFaRIb qqBYH2PtVcB3xgh8w8U7fEe/mT/EnTn1bM1tr1nhEdW87kp314E0bIvKYQ+r5yMRo88T QzcWN+hYwimg6Kvnvdj//sBNmtrYV/E+d7BLnH9yXOA34L+tRUVo33QPMoAZoMJi7pZc J2ZWecOx3CjZP8Eydvdw3Q3CIownEPwBjgknLrrGoug84Fz5JPVRINuwgXEY+VBDHMnv 3gY/vFKpAWOytes8d9s53ik/qAsS71SnoCoMRNoEiMZS5jdrm+Hd+h1AlHJMoZHJoLKS E+Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776911166; x=1777515966; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WKKG5mUe3JYUX5zwPC5aQIXjrS8/CQIYsmAWT2nljUk=; b=olkWqybuG1fCpL3urli4fCsTkm0/BH7HKDsY0dBVo5YErY7LYxMPwBIKq50qaGocp0 l8vl3Th2zDkmPMDXX7aRiqKlJ5lIdKWkgD1vJEcPOgWdPJDNegA0Q2pnw1ozBDQUJmsF UunvTHz9jSAsOSiUJvfD2eBPAnGvVROZuLITXrMZOQQy7teL6EEht1qvpE22Y8rA4rEq oiNYnq4GDI3CuVY+rbQ4lgJKAizJYBoZLF7MlfCHzoUJXmRTkTUy1r/eggC0j7iZmubi qxtCwOghBxlUqVHy/aFfjAMqDTOz2YrqmVCng2Jp6pFTgkHzuNwrp226LerLCOQlHUeZ Ds7Q== X-Forwarded-Encrypted: i=1; AFNElJ9owEY7BeDwjFeb7ugURrCTzKu22tuHz5vR0pV+otT5kkCPlD+S+DOO/MAdwrt7yTVDdFzT7KEmWhcrRFAX@lists.postgresql.org X-Gm-Message-State: AOJu0YyTDHfxKWx+xs3Ag4We+O6/kwDEc35shmkIX3PGW+6lmgpi5REd zI+l9sZWk0dR8TVqD5QYExDHDKs7PS5DGOsJ5YF6FBUCKkH5JtU4NXGsfCv2TNu9E0LwMGBGnV9 Om5apqvtNeCmeDEJKMHglICqavcCE3ls= X-Gm-Gg: AeBDietZ9v5hxekK5xnxQcA0r3J4InT8FOipQnUz3DCZCsBU1Lm+m+Ls2sbfRIkMF9M bKwEdMXZ2VnpEjFIpqsFZMZuu0ani7i4rAc+6Bnfpt6zapAyRIIbrFOivZ3WWlWBYFRkGGip2Bf GsPjUd1RvbAFVL/X25shoVQLwU+AsSgzZ+7+ifUF+y5VNQUxMpjo9DTJs/TAuSlGfMRFgky+EPg vH7bgwoylNzAW2Sy2DahYx68m6mVFrEThEUpAhoZ8OQRyVA2RDzZrkU0YWEy749TwjyAjbfXEuI vqenpdvvAC24E52E9+yJJypwvxJdT8cqaA6iYD4c6wSxJKBBTYGihjHi X-Received: by 2002:a53:b608:0:b0:651:c71d:8a4f with SMTP id 956f58d0204a3-65310a9c637mr18927595d50.51.1776911166377; Wed, 22 Apr 2026 19:26:06 -0700 (PDT) MIME-Version: 1.0 References: <8afecd87-d1e5-241c-5e3e-75e1c62c279b@enterprisedb.com> <1bc5e1e4-380b-213d-6e6a-d5e8f7f0c7f5@enterprisedb.com> <84ffb566-8038-ab35-c841-7a5e5728a247@enterprisedb.com> <525ea957-88ff-e2c6-2975-474c849aa234@ulb.be> <48a78946-f380-a279-e75f-711846e509f8@ulb.be> <4c443cf6-96af-0953-fd5b-bd2b5c0c6f00@ulb.be> <2516071.1699991181@sss.pgh.pa.us> <08b2dea8-6dca-06e4-a53d-3e6334e7645b@ulb.be> In-Reply-To: From: Haibo Yan Date: Wed, 22 Apr 2026 19:25:55 -0700 X-Gm-Features: AQROBzAni-dG04tb3YkFP1SeQnTGUDgyNR3JjbFRvAa4WFkD4cJ5uOzLvghOdOQ Message-ID: Subject: Re: Implement missing join selectivity estimation for range types To: SCHOEMANS Maxime Cc: vignesh C , Tom Lane , Damir Belyalov , jian he , PostgreSQL Hackers , SAKR Mahmoud , Diogo Repas , Andrey Lepikhov Content-Type: multipart/alternative; boundary="000000000000de93da0650175e14" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000de93da0650175e14 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 21, 2026 at 6:54=E2=80=AFAM SCHOEMANS Maxime wrote: > Hi Haibo, > > Thanks for the continued feedback. Attached is v8 addressing your nits > on patch 2: > > - Reworded the commit message to say "the same outer-bounds-based > estimator can be reused" instead of implying the code is just > duplicated. > - Made comments in multirangejoinsel type-neutral where they > unnecessarily said "range" (e.g. "bound histograms" instead of > "range histograms", "empty values" instead of "empty ranges"). > - Added the reverse mixed-direction tests (multirange x range). > > Regards, > Maxime > Hi Maxime, Thanks for addressing those points =E2=80=94 this looks good to me now. If you don=E2=80=99t mind, I=E2=80=99ve created a CommitFest entry for this= : https://commitfest.postgresql.org/patch/6668/ I=E2=80=99ve listed both of us as authors. I=E2=80=99m not a committer yet, so we=E2=80=99ll need someone else to revi= ew and (hopefully) pick this up for commit. Thanks again for the work on this. Best regards, Haibo --000000000000de93da0650175e14 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Apr 21,= 2026 at 6:54=E2=80=AFAM SCHOEMANS Maxime <maxime.schoemans@ulb.be> wrote:
Hi Haibo,

Thanks for the continued feedback. Attached is v8 addressing your nits
on patch 2:

- Reworded the commit message to say "the same outer-bounds-based
=C2=A0 estimator can be reused" instead of implying the code is just
=C2=A0 duplicated.
- Made comments in multirangejoinsel type-neutral where they
=C2=A0 unnecessarily said "range" (e.g. "bound histograms&qu= ot; instead of
=C2=A0 "range histograms", "empty values" instead of &q= uot;empty ranges").
- Added the reverse mixed-direction tests (multirange x range).

Regards,
Maxime

H= i Maxime,

Thanks for addressing those points =E2= =80=94 this looks good to me now.

If you don=E2=80= =99t mind, I=E2=80=99ve created a CommitFest entry for this:
https://commitfes= t.postgresql.org/patch/6668/

I=E2=80=99ve list= ed both of us as authors.

I=E2=80=99m not a commit= ter yet, so we=E2=80=99ll need someone else to review and (hopefully) pick = this up for commit.

Thanks again for the work on t= his.

Best regards,
Haibo

--000000000000de93da0650175e14--