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 1lZltg-0000Zi-Ln for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 02:50:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZltf-0003FR-Eb for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 02:50:23 +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 1lZltf-0003FK-0m for pgsql-hackers@lists.postgresql.org; Fri, 23 Apr 2021 02:50:23 +0000 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lZlta-0000GG-Dq for pgsql-hackers@postgresql.org; Fri, 23 Apr 2021 02:50:22 +0000 Received: by mail-oo1-xc35.google.com with SMTP id c6-20020a4aacc60000b02901e6260b12e2so7909963oon.3 for ; Thu, 22 Apr 2021 19:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kSXJoxO+330mHUjJTnF5fM4oyho0Mo/anLM8eMWdqv4=; b=nI7SzpQ4Dt0u+g0Vyhh7QmseDn7/D+txxcPhTVJmKaQGHyek4Pkk2wIkZKQqZBAKD1 825baNLtSzVFULBsuVEMDJysLP14CrTicT1x0Dups1+F5fdT65/FHuAKeL4IRlhldUos Qf/RDciv48bJg1scOZvVh+3i5A7I6TDDhyTXa8etqi7NqZW1BoBa6uQ5d6P99hqPrnvH 9Za6zkH8LiVCl+luTZKUyqytrPHW1NcAkuLIpsydkzApr0UO594lNJW+Mzl+Rvkixz8h UHlPL5Edi7uIvVPByoPl8c1OhwOYrMk937PLf+wd7JbrN4v3REwFy2oefm02VdH4TRi4 98wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kSXJoxO+330mHUjJTnF5fM4oyho0Mo/anLM8eMWdqv4=; b=HP8V/xvixOxzhyTXCG8SvjqHtepr7G0NoAwbjVEEpzW3lXlCfVYSRTkux7ac8MaAYi VYzzTte6PMm8qaUF3ZSZvJAAURo//MYa9UOu1rsyDn78B2xFhms04uENGv3RXXbhgvNJ PzSnjPlXoEJ37lnYqFH8NUge/tNo22prXQBi/tdcK19qhkVtHQp4D7BMtagw1fr/Fit2 FT7LsDASMRqXqZ+j1SEL7v0O/LdUqewqfokgaJw9GOMqlnLwaoMa7IDYGyMmeorDtHWJ quyprdxvJ/tJBvLiYp4oLodZ/HGs2iz7YWhERaDnZMhNLl+j8IGbIbmKohw/BhF26PFC F/wQ== X-Gm-Message-State: AOAM530uzRMdUEo+uCQltfTLgfSH6iiqE6KiEZkBNA1G6NnCo3+oygp3 Z/ceMg3saWo3swsVnZEG3kSNsQ== X-Google-Smtp-Source: ABdhPJynaPx1rmc9EiJbFhAprGTNsHALwr69Ni8v72dyG52X7jB9Pfguad0qWhs4yOvh/PHh1zAC0A== X-Received: by 2002:a4a:8c4f:: with SMTP id v15mr1205472ooj.25.1619146214864; Thu, 22 Apr 2021 19:50:14 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id u185sm975211oie.12.2021.04.22.19.50.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Apr 2021 19:50:14 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id CAC0F8009E1; Thu, 22 Apr 2021 21:50:12 -0500 (CDT) Date: Thu, 22 Apr 2021 21:50:12 -0500 From: Justin Pryzby To: Tomas Vondra Cc: Dean Rasheed , pgsql-hackers@postgresql.org Subject: Re: PoC/WIP: Extended statistics on expressions Message-ID: <20210423025012.GI7256@telsasoft.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <078de413-8e4e-343e-fac1-eb61fd389925@enterprisedb.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I suggest to add some kind of reference to stats expressions here. --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml Updating Planner Statistics statistics of the planner [...] @@ -330,10 +330,12 @@ Also, by default there is limited information available about - the selectivity of functions. However, if you create an expression + the selectivity of functions. However, if you create a statistics + expression or an expression index that uses a function call, useful statistics will be gathered about the function, which can greatly improve query plans that use the expression index. -- Justin