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 1lPyQS-0000fq-0Z for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Mar 2021 02:11:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lPyQP-0000qP-3x for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Mar 2021 02:11:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPyQO-0000qH-Pb for pgsql-hackers@lists.postgresql.org; Sat, 27 Mar 2021 02:11:40 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lPyQL-0007BJ-PF for pgsql-hackers@postgresql.org; Sat, 27 Mar 2021 02:11:39 +0000 Received: by mail-ej1-x635.google.com with SMTP id k10so11202589ejg.0 for ; Fri, 26 Mar 2021 19:11:37 -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=iAjlQ690fHulKSm7LE2YddDasbz5N5uOHMv+ZzmSB54=; b=ZfB7qi6bNxWvFT504YbFkpPCNwWyIHNN7NkQFryg+CEk3AhhbHeKTp9q0UvS9mFC7w XkmhjS7liugOZwSe9C94OOAedDcU4U4XOrzRECE8surS6h4vAcV52Sxd1l/b+MYR2rSl bQdT+vf3z6XaINEKg7Y0DHqU9XW501IF7F9B4yq4tEvb4AzWwC+E38xO05nNwA2ZRqrB 2fnsJaZ7SniDYExNszrHRgPZR4Gl0Ej/YCemSDCZSsBoC7X0Gl4+ORUDpPnyDGb/5FuN Ir5//WrpDACDzfLNdYmCL9MA+CaAeo4eEwrm/X9qF/fkkPQmU5ktBaIQ3+ggGI8y9ztz S4+Q== 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=iAjlQ690fHulKSm7LE2YddDasbz5N5uOHMv+ZzmSB54=; b=fk2DDHDIbBi303RJA+WeJV1i5GxCLbcaQ0vxTCNlZrd7KPYfRfEDUKW09gVClRiJdf pByZHPWjv2g8yLm+NpbybKugeM1MjJlDUQO+0YDPkmKU7smqF6Us0J7cqBhyCefaBOFt pKkR8v+E/deVct22RCtSqiSs1lzSFTxjOU9Y4YyetMusI2iTfGKbqnK7+sU6TeYwwY1l 0jvZmXffBJUogrsAkQHOkvdmEn0Ra8xvQvwZwc7bSOH8Ztrn832w8m2qPTeKzFO4Yao/ V1d+24DkyXEIYSXdocL+PKlS2EOP/TFS2LpcEaC2TybXe3A7VP61ZzZp+giH+XgZghuE 3L4g== X-Gm-Message-State: AOAM533ks5n3xEOIJrp5c42FxLhdtIOlVLViiLdcqcYqJacn2qNAVcCF xRgSp9DOdFM6wiS3zCavaASGIIO+VKHkqBOui2jzMx+fAwtKe4hKy/s9HiNPhSgW5XCpDPk1s9J l7W3F+/fiDOHxiHeNxNMQt+HE9RGdPNUeFt0aoQzQ4tjvAnWU0+Twrs8Egc5aY8O8i1w+uIwtZw Qte7cgpoUiosEIB8O267MFdP5FtLqv89d0pjml6Et56Xs1EPgQoWSAci1PEXnv5NsmA7MSNBL85 RKG/4XZdfv+D7HBgsC2zvYIWqlJJC4UVmFoNA== X-Google-Smtp-Source: ABdhPJxtilndNQIc8x/tPVC7xr2FlLzTuiS6zBB09Nkr3bpQWS6N0j+1p6BFEAoDErv23TWC6V8qAA== X-Received: by 2002:a17:906:aad5:: with SMTP id kt21mr18106773ejb.160.1616811094870; Fri, 26 Mar 2021 19:11:34 -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 v8sm5122916edx.38.2021.03.26.19.11.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Mar 2021 19:11:33 -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> <078de413-8e4e-343e-fac1-eb61fd389925@enterprisedb.com> Message-ID: Date: Sat, 27 Mar 2021 03:11:30 +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: <078de413-8e4e-343e-fac1-eb61fd389925@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/27/21 1:17 AM, Tomas Vondra wrote: > 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 ... > LOL! It failed on *my* buildfarm machine, because apparently some of the expressions used in stats_ext depend on locale and the machine is using cs_CZ.UTF-8. Will fix later ... regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company