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 1lpyDA-0004PX-V1 for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Jun 2021 19:13:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lpyD9-00016Z-1i for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Jun 2021 19:13:27 +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 1lpyD8-00016R-Lr for pgsql-hackers@lists.postgresql.org; Sun, 06 Jun 2021 19:13:26 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lpyD4-0008Mo-DX for pgsql-hackers@postgresql.org; Sun, 06 Jun 2021 19:13:25 +0000 Received: by mail-wm1-x330.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso11165780wmh.4 for ; Sun, 06 Jun 2021 12:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NzYX5L1XudMH87ep6EQ1H6M5rB9l67SqdBUkIH9gkfE=; b=qJJMrn3UL9RGvm7GT5Bv1Lsho74nDD0JPoGZliO5IhwrMajYgnw+3J8eSLCF61DoHk Z5m1RDXARzcFfH9hUHy8Z20wGTVMuylldUIdQosz/S6CYxb20G8lv7Axr5i1QzH9jVhM J+3QdxJwkcIr8MvNtwZ42NHQYV/fMvofw1HWNxmyhOv/GQ0YCCoR6mKVQrXu7tAyokT+ uG3ixNpuaTVM1igvaIUbpgKHbhn/ydYv9VQ7mB69+DL3dLaPBcGAq7gwa8z/RkwgOx83 zeWrtqkZ/ddPoU7QsJ3+xQZW+gDjRLvgHPpJLXFkesU1y2YsT+O4HYe25n3qv5PGxgAO NmMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NzYX5L1XudMH87ep6EQ1H6M5rB9l67SqdBUkIH9gkfE=; b=m9GV2LCRN6k++x+Ci9Z8dbChyKeKPTGmbnkqP0Cz7T3t4MfT7bjAylpyGEJaoFN1N6 3n11nAfx0eQGehH8zUADM/TohXOHaP9x5P2hFRtChnTDMIQZJ5KpFltoiYGCBZcSbfvA w+UbhX9sbDRjOAAjP0mdfEdRIJZEExAd3PAF6XPuqqHWEIrU4uyhNhQHLrOB6+Y+prRA bsKkiWxg9pmNbwHptXkjT77RRDqsVGfS8NcIVwxz9cSBM8DD2nIk5ssIOwxydvpr3tie WDt7VjQcZV/G2610T0+MC4OT0Xdac/o5kCMl3l4+nmqjB9AInOOzCNd4/BwvXGSCziQK y7Bw== X-Gm-Message-State: AOAM532KPTPIiWTZlh01nXBvtQnq7RTqMpaIivUD+zE1PUZyBNPCOB41 /ITsr3iFAdebChyC3yiYYOA2aqWHgNiULg5O5juDy+Ecn8vwOOwOKfl2IiCgVZUwr6LQx26DliI xT8E+pwTydzkWJgpdyysZfF2IWbQ3PvhpVX7+SgAWDXD78a/S4dJSP4nQD0nc4WC6eZENEClTGB /DYUwp0XQoWNozwY/pmC6nZSjP0yCCzsCxNacG5392G2lz/Mw/C1i5b0zSNbXFL4Rs3qgNswmuA K6H3M4ljXe2TgMja+CugVUrm556UB+vCxWuTGu9 X-Google-Smtp-Source: ABdhPJwq8Ao0zM0zAF1ogNKkl0KFKmExnmRl3kfw7E8paPAQbIsuTZc6Gd5q3isTEgS6So+rCafFJg== X-Received: by 2002:a7b:c106:: with SMTP id w6mr13378258wmi.75.1623006800857; Sun, 06 Jun 2021 12:13:20 -0700 (PDT) Received: from [10.137.0.19] (ip-86-49-254-183.net.upcbroadband.cz. [86.49.254.183]) by smtp.gmail.com with ESMTPSA id q3sm13357816wrr.43.2021.06.06.12.13.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Jun 2021 12:13:19 -0700 (PDT) Subject: Re: PoC/WIP: Extended statistics on expressions To: Noah Misch Cc: Dean Rasheed , Justin Pryzby , PostgreSQL Hackers References: <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> <20210606053740.GB297923@rfd.leadboat.com> From: Tomas Vondra Message-ID: <4c98203c-8364-bb76-b502-d7b323ba55ba@enterprisedb.com> Date: Sun, 6 Jun 2021 21:13:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210606053740.GB297923@rfd.leadboat.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 6/6/21 7:37 AM, Noah Misch wrote: > On Sat, Mar 27, 2021 at 01:17:14AM +0100, Tomas Vondra wrote: >> OK, pushed after a bit more polishing and testing. > > This added a "transformed" field to CreateStatsStmt, but it didn't mention > that field in src/backend/nodes. Should those functions handle the field? > Yup, that's a mistake - it should do whatever CREATE INDEX is doing. Not sure if it can result in error/failure or just inefficiency (due to transforming the expressions repeatedly), but it should do whatever CREATE INDEX is doing. Thanks for noticing! Fixed by d57ecebd12. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company