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 1kCQGx-0002H3-Qi for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Aug 2020 16:33:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kCQGw-0002J6-H5 for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Aug 2020 16:33:38 +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 1kCQGw-0002Iz-69 for pgsql-hackers@lists.postgresql.org; Sun, 30 Aug 2020 16:33:38 +0000 Received: from mail-qv1-xf43.google.com ([2607:f8b0:4864:20::f43]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kCQGt-0005xU-3h for pgsql-hackers@lists.postgresql.org; Sun, 30 Aug 2020 16:33:37 +0000 Received: by mail-qv1-xf43.google.com with SMTP id x7so1812138qvi.5 for ; Sun, 30 Aug 2020 09:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Ljm5GJU0SFTvCRKBO2nXnbQP0oc93R/whOh2Fojxxgg=; b=UW3n6lulkE6hNLHhw61qOETthUQjcKObeFl3wlU4/yfaY6dxEXxaZt1cuqFQj3ohz2 e66j/kFhmWTuStcpb4V3prjoHBnJbVxlGJ2s0Zly3elxTu0di7MgGnBgjmepjy8p7vBM MIdPWx8GkLK51xnbnzHD7J393IcBvm7qtlLimdK1ers9c4tyYyLmow5c9T5nyyGygcWr 2roAe/S1jbMTGPQyQd3/NxAGz6/lmJrI9HT2fcvwZgt1B3/+6fhlYSCwLPrIUyAANA64 Wd0wK0D+nZfP0mEnTYEk84NyXkDv5lohBTKXjq1p3y1QVQxbnzGeHKGco6vKazEmZURN LpsA== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Ljm5GJU0SFTvCRKBO2nXnbQP0oc93R/whOh2Fojxxgg=; b=eWCmoleOVn2Y95lik1roYl0Qy3ONhg4Tmc/2M+lkUvBgA5JhOpgc1ODJIjlVvg4Mfd AKCYwON8mq2AaMv5JIp7Da+nsn4zEUT8Cbsfj6tfCOnf8JwvJIrBQRD4xHI2VonaNSRu OEVOOGG4Jz5JiUqID+oxPtlT7l4/19G8hL0ukJyapWtE71LImEsdagNajEtZ5hSP71ri 4LEpRzw1U9RwYlPIu0UCOJu/Md2iQs+zhIdOdGUQaFkH4P/q5hJwSIMa5G3MGeAbHpbX +cZuTLJMukBBJT0hQR/YuxCUovmR7hODpn0xazvO39Hjr7z2fwiC+r8W+hrUxi7Y4vsy tk9Q== X-Gm-Message-State: AOAM533QHZIuG7w6zO+DxkMf7lmqVOKuqdZ7m9N+gPbs9XFy4INRIN7U lsvChWjhtlzI8wAcZksaVT8CgA== X-Google-Smtp-Source: ABdhPJweta+M9Lsas8aeBbJ909xDRHDwYhCn6LhaW1c8mvQb6D004az4tRVlZ1VMxEPQI9wxliaDcg== X-Received: by 2002:a0c:ecc5:: with SMTP id o5mr6911775qvq.222.1598805212651; Sun, 30 Aug 2020 09:33:32 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id 71sm6136152qki.85.2020.08.30.09.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Aug 2020 09:33:31 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id CD1122A0FB4; Sun, 30 Aug 2020 12:33:29 -0400 (-04) Date: Sun, 30 Aug 2020 12:33:29 -0400 From: Alvaro Herrera To: Tomas Vondra Cc: Tatsuro Yamada , Julien Rouhaud , Pavel Stehule , PostgreSQL Hackers Subject: Re: list of extended statistics on psql Message-ID: <20200830163329.GA21915@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200829225436.atuttqilrcgppqio@development> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Aug-30, Tomas Vondra wrote: > On Sat, Aug 29, 2020 at 06:43:47PM -0400, Alvaro Herrera wrote: > > On 2020-Aug-29, Tomas Vondra wrote: > > > Also, it might be useful to show the size of the statistics built, just > > > like we show for \d+ etc. > > > > \dX+ I suppose? > > Right. I've only used \d+ as an example of an existing command showing > sizes of the objects. Yeah, I understood it that way too. How can you measure the size of the stat objects in a query? Are you thinking in pg_column_size()? I wonder how to report that. Knowing that psql \-commands are not meant for anything other than human consumption, maybe we can use a format() string that says "built: %d bytes" when \dX+ is used (for each stat type), and just "built" when \dX is used. What do people think about this? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services