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 1lPwdr-0004kc-09 for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Mar 2021 00:17:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lPwdp-0000j0-R3 for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Mar 2021 00:17:25 +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 1lPwdp-0000in-FZ for pgsql-hackers@lists.postgresql.org; Sat, 27 Mar 2021 00:17:25 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lPwdl-0001EO-JQ for pgsql-hackers@postgresql.org; Sat, 27 Mar 2021 00:17:24 +0000 Received: by mail-ej1-x62c.google.com with SMTP id jy13so10910269ejc.2 for ; Fri, 26 Mar 2021 17:17:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aYgBkL4SHILXvYoc8OkqLJ3/LEPJQvACSlWSSTtvFxU=; b=MTB01RbbQqc9+kjsG169w7fdioiyrH9Sudp5/Ovf7G81KzhzwwQAEe9lqWArCeKeQq iCmB+W7KbyirCWbSLuaj83dlEfMI4oC+Mtcv1p6Ckc0LSqo+G1Bxdc88BGTbIGDzguzg qeGvYWR/YZGvoOoxhxrpsfpluwBE3EpNgtcWNKfh5AcbufVRZdHDTQjByxYKDkXDqZth AJ8rk0xXSAHESgUP47K25xmEz9bgNFij3sJGlb18r5VTvE+tIuqbihA5QIbH4Vx8/y7R LOxs2s3vCMbW4hFsLw6cNTtd2sKwHYD365W62E/PvO/e3tdcQTTMjRC8OQEJ/Y+AU+x/ iqRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=aYgBkL4SHILXvYoc8OkqLJ3/LEPJQvACSlWSSTtvFxU=; b=NUsCq1SfJPunzKauKmDFdz+fvls0ytyX6ZrIPbZLLHAJ5UYpzmK5Hkk+6hFvPUjHaH dy/kZiSPluLCGnv/JCZ0gAme7aTaukoSBQOkgG8Gt8oLfAKQ+HgpM4aADWCn4wljlgJN lzu1EFOu2n4SKi6mdTy9VK3qSnP6O3BN6fpgH6D8AQHXWA4p1OpYz0n6CxNbetpDF2e4 a5NnHcHVISxpQrwX4V6rMbnJcl2SXuKrs+6kCvSA3uUkzD5xAiOOrq6Y1pfoxxLq3/wV 8fmPyAHgEhBSZNR/v9iIuyNiLOV8Ck0XOeXV43+5DsdomfovnFkJ4JomwLEzUeqxLZiR VrqA== X-Gm-Message-State: AOAM532Ebm90USKebeUoYZbicmoIKB9xZJj/vB9tbWUKeJINr3Bb+fkX sf83W7y8at9nuh6ZFmKuPG+3Oj2/dknqtgps58oifsBJtXwfknRKSlDF5twwWocM8YaY4xZJick Y2qOYLR5eCF8neSBADL1HjV8wYDX2qSjGwPq7iP0prmtVAibOPY8CVTypbgzZqEbQ9G69lI0QJV CsamOp9hb0RhVUkqg08u52T2nQ5+JiI3i/EMy9bzlU9UGTGRrl9Wkc+Y8mN+Idzllq1FpfuV/b4 qCVs2bdx9CyRKUJnFmcz+IoeA6s4ByYYkhJrQ== X-Google-Smtp-Source: ABdhPJwQIVWK+P7/ZYPojyVz2/bYGU9GLB/EBCAsP9NPdzeEUWNSwMYAFpDfbeMJ7Svscgg8z8Jo6w== X-Received: by 2002:a17:906:8408:: with SMTP id n8mr17265259ejx.152.1616804240040; Fri, 26 Mar 2021 17:17:20 -0700 (PDT) Received: from [10.137.0.20] (ip-86-49-253-127.net.upcbroadband.cz. [86.49.253.127]) by smtp.gmail.com with ESMTPSA id hd37sm4335142ejc.114.2021.03.26.17.17.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Mar 2021 17:17:19 -0700 (PDT) Subject: Re: PoC/WIP: Extended statistics on expressions From: Tomas Vondra To: Dean Rasheed Cc: Justin Pryzby , PostgreSQL Hackers References: <9f6654b1-ca31-f979-0fe8-137683818273@enterprisedb.com> <20210324081402.GB28335@telsasoft.com> <20210324091708.GC28335@telsasoft.com> <1ff3fc47-8f6e-7839-c3ff-6b694956f92e@enterprisedb.com> <1ed534fb-b42b-f008-35ee-4eb930b0088f@enterprisedb.com> <2cb8a7cd-664f-8681-6ce9-790a50e3c78f@enterprisedb.com> <096d26e1-f053-a039-047d-a050dbb80ac6@enterprisedb.com> Message-ID: <078de413-8e4e-343e-fac1-eb61fd389925@enterprisedb.com> Date: Sat, 27 Mar 2021 01:17:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <096d26e1-f053-a039-047d-a050dbb80ac6@enterprisedb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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 On 3/26/21 1:54 PM, Tomas Vondra wrote: > > > On 3/26/21 12:37 PM, Dean Rasheed wrote: >> On Thu, 25 Mar 2021 at 19:59, Tomas Vondra >> wrote: >>> >>> Attached is an updated patch series, with all the changes discussed >>> here. I've cleaned up the ndistinct stuff a bit more (essentially >>> reverting back from GroupExprInfo to GroupVarInfo name), and got rid of >>> the UpdateStatisticsForTypeChange. >>> >> >> I've looked over all that and I think it's in pretty good shape. I >> particularly like how much simpler the ndistinct code has now become. >> >> Some (hopefully final) review comments: >> >> ... >> > > Thanks! I'll fix these, and then will consider getting it committed > sometime later today, once the buildfarm does some testing on the other > stuff I already committed. > OK, pushed after a bit more polishing and testing. I've noticed one more missing piece in describe (expressions missing in \dX), so I fixed that. May the buildfarm be merciful ... regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company