Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pICqR-0006pJ-Co for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jan 2023 18:07:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pICqQ-0005NP-0m for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jan 2023 18:07:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pICqP-0005NG-Mu for pgsql-hackers@lists.postgresql.org; Wed, 18 Jan 2023 18:07:29 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pICqN-0005YY-2s for pgsql-hackers@lists.postgresql.org; Wed, 18 Jan 2023 18:07:29 +0000 Received: by mail-wr1-x434.google.com with SMTP id b7so8805266wrt.3 for ; Wed, 18 Jan 2023 10:07:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=YfIK7g68n56LPDbwHTH8+pivtymuSkL+2XDYB0udO7s=; b=eQ9Uo3Lo/IH0LlJEm1hUIzEvprFNJjUPtnm/edcX7ee8x4Sc3B5yPzsq/QCpsOAVSj j7n4DWyAnbsq2BXN71LYPR15G0YhEfPQKXrZttFBdq7A7sb/KJKTe6NAEYKB5BlGKZoq GuI5kZpkP6z99irLBnPEQDzTz06aXHnbvSsAJOS4eMsXxu1Jhv3T6eA3oxorFVHuFxXz SYaQmi2Lo7gWh4t6nIsV4/TY4P6UK6O8+oT0dDl1E2+nncXh+4BZTB+mQO+G9RgzgJJq 4opUPHpBvFtAo9xCDMorxa6W+XdvNCUvntooSrX4bSsgOuSBqqO/+wRs1bdj0GnMqzKW Vtpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YfIK7g68n56LPDbwHTH8+pivtymuSkL+2XDYB0udO7s=; b=Ox4WbsV9efBcTYNasHs4lPG6BHGjHka7d+4+5TzG4da4D8bWPm78H1gldjCrQbYMZP H4/fSm7CDAenWDHv7isevA+T7shQHicRGTJ4G+XT5CEHRG6iY/TyH87ezZa4xLgzyKBI oGGDvOQM7mYskVUZRWH4k+5oI+hIELUKvnI3sHfXxl9+9U2IOXT90+MqhBtm2Y51xNfZ 0u5uKDE0/BZZeuCO4WjGkPi+H6AAVaDlUlggcAX6YWHL7RlqhucocwFr7fqLWbZosxBZ nzEUjpddVGirlHp+NGuK4xwgAsrDr7GoG+jG/nYW17h66IEm8/2uLVkPWmz3nqfw4Q+t cBBQ== X-Gm-Message-State: AFqh2kpc4uE6eT1nKGAPyClL2auNwz/dzhr2bThgWj3WVJuHF9ygkNqx e8X8X1mkLjS5Nuc9ZhYc+chPT3iJXXWmacxyb8THveSZOlWQbeemiV9IQdyGGItfgxhW2K441UT fzLk8RLlJA0/jNz3eoZLd29a4BNgKFZjH3C8gjyiUxPxEiFurm/2tUnddZmunxdKsOD2Jvf4RpU C/Jw1Gz0dfbXo22bFIGrajsecQ+H5IE5iLgW2oR3/rW8Sq6xNSNVLF5x1iitq4BZdLyBVUthsSq OEVv89UtWCG8IqCEnlFn3eZk91YT034L1eatpi28+u1+a5vHkqRskrFvrV5 X-Google-Smtp-Source: AMrXdXsOVMxv8hmi5dSP5PnBZlVFFLkY4suB0aTbG+KZy5Bgjcg1+VLyjxBN1dk4E5zwKVl2K7cHvA== X-Received: by 2002:adf:cd81:0:b0:2bd:e0e8:694f with SMTP id q1-20020adfcd81000000b002bde0e8694fmr7085193wrj.32.1674065244926; Wed, 18 Jan 2023 10:07:24 -0800 (PST) Received: from [10.137.0.17] (static-84-42-175-93.bb.vodafone.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id g1-20020a5d46c1000000b00241cfe6e286sm31575262wrs.98.2023.01.18.10.07.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Jan 2023 10:07:24 -0800 (PST) Message-ID: <1bc5e1e4-380b-213d-6e6a-d5e8f7f0c7f5@enterprisedb.com> Date: Wed, 18 Jan 2023 19:07:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: Implement missing join selectivity estimation for range types Content-Language: en-US From: Tomas Vondra To: Mahmoud Sakr , PostgreSQL Hackers Cc: SCHOEMANS Maxime , Diogo Repas , Luo Zhicheng , Andrey Lepikhov References: <8afecd87-d1e5-241c-5e3e-75e1c62c279b@enterprisedb.com> In-Reply-To: <8afecd87-d1e5-241c-5e3e-75e1c62c279b@enterprisedb.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Also, calc_hist_selectivity_contains in multirangetypes_selfuncs.c needs a proper comment, not just "this is a copy from rangetypes". However, it seems the two functions are exactly the same. Would the functions diverge in the future? If not, maybe there should be just a single shared function? regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company