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 1luL9l-0003GG-Gp for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jun 2021 20:32:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1luL9j-0000sG-7J for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jun 2021 20:31:59 +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 1luL9i-0000qv-Vj for pgsql-hackers@lists.postgresql.org; Fri, 18 Jun 2021 20:31:58 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1luL9b-0001sO-7w for pgsql-hackers@lists.postgresql.org; Fri, 18 Jun 2021 20:31:58 +0000 Received: by mail-wr1-x431.google.com with SMTP id i94so12045390wri.4 for ; Fri, 18 Jun 2021 13:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=mPLT1mNkk12TtQ5b878Y6KAYJY4gJ+///HVGDFxxoXA=; b=b1diVorpAcqlEyArnJaYIkybeCPfqu/DfiG5RUqsb6HR22/4tYX2HHqyp9IVM+gbPd yjEEVXETC17JWuYrlUFETkbQrwVSBKYaiqyD3w8PEHAyeadMt//Cl46PfhDZOMZgfYpL 0rH1g4fSN76Xz72M9Hz0ey24Li/ZctC24i+mQRoJSFC5MoAigvzYXUf5oKTveUXQKWVK H9TngqUO4VnJR1c9oQOQjEeKnS19XFhebpKCpG/YBKRA//WPF4IqBAF/qkM38wGN6hKE etjGM/3l9sHfxdXtPki/m7RJAqzUTHu98zLQDu4i5Ux8S7u2WdW+GhD6NO0KpGVmbRN3 7qfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mPLT1mNkk12TtQ5b878Y6KAYJY4gJ+///HVGDFxxoXA=; b=ii9+xnio2PvCT4sUw/S9bv0yQAM+vBq7pP7RdTGzFbWnTRMUDXBy4j1Y1adwfkk7d6 Xhb/OMYFgf3Jixux1jTLVCILz7xgUgRYNlGmITpnwGWofCZl7SrNq0hoBwsYBj0/0wZ1 Y7gPjQHlfMKClyQAIbF55zVGbZx89fQ3hTDRkGxwCD0NRcGVuOoPKWiwygpT/MLfexTL R8bcjQ4c5h4ZJXAWItu048ZVVRk/+pX+TeyyOXixNY01aj287ADHddW6hCEvz13jD0Fq +uT9YURLHFTpycTSb2C/R+oFlMcNZeVtdRg/kCKDyNb+v/idMRG4iVsSzurYyZuw011i eBvA== X-Gm-Message-State: AOAM5336dQL4UBayVbqXmJUBdWoGDSgVO6JtXgdZ9kFdoNCSjReXehMF C31XYA67Y6DU24pYBdB3gl+TQKD97ZVtWBlIGH/kGYg51izS8pNAY7iGuNcKz6fYzo7ggZfhGPJ Yh+a0wReXpxV/qJZskaJFysjnvJ0U2RkfW5LP1jnqa8pDRmltoFLqeDjEXO2OSlyXIrMhEiCxvI +9H1dYlzqnq/6oErns94yxUxwnnMkLaXHUd84lEhipndt7UeFTF5o+npG4X7AoZFk1dRGDX71LI hmkmAUitB7SvGuSNXX6efAT4i1JDitx9bA/QOE/Ek6wFNAlFZLVSihx X-Google-Smtp-Source: ABdhPJwTt/vx1rpLqgRIOWalbTF++nynR9DJ0Q1DE2vwXsf9ZR0v8gs20HNUxbWcHR3ocymO0rO0Fw== X-Received: by 2002:a5d:6e04:: with SMTP id h4mr14261887wrz.256.1624048309166; Fri, 18 Jun 2021 13:31:49 -0700 (PDT) Received: from [10.137.0.18] (ip-86-49-254-183.net.upcbroadband.cz. [86.49.254.183]) by smtp.gmail.com with ESMTPSA id t1sm9393624wrx.28.2021.06.18.13.31.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Jun 2021 13:31:48 -0700 (PDT) Subject: Re: pg_stats and range statistics To: Egor Rogov , pgsql-hackers@lists.postgresql.org References: From: Tomas Vondra Message-ID: <55c8ecd4-57d0-5c63-6fe3-1b81e8caea9d@enterprisedb.com> Date: Fri, 18 Jun 2021 22:31:43 +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: Content-Type: text/plain; charset=utf-8; format=flowed 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/18/21 6:22 PM, Egor Rogov wrote: > Hi, > > Statistics for range types are not currently exposed in pg_stats view > (i.e. STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM and > STATISTIC_KIND_BOUNDS_HISTOGRAM). > > Shouldn't they? If so, here is a patch for adding them. > I think they should be exposed - I don't see why not to do that. I noticed this when working on the count-min sketch experiment too, so thanks for this patch. FWIW I've added the patch to the next CF: https://commitfest.postgresql.org/33/3184/ regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company