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 1kCQVF-0002sA-Uj for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Aug 2020 16:48:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kCQVE-0005Et-P4 for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Aug 2020 16:48:24 +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 1kCQVE-0005Em-Hs for pgsql-hackers@lists.postgresql.org; Sun, 30 Aug 2020 16:48:24 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kCQVB-00065p-KB for pgsql-hackers@lists.postgresql.org; Sun, 30 Aug 2020 16:48:23 +0000 Received: by mail-ej1-x644.google.com with SMTP id h4so3867414ejj.0 for ; Sun, 30 Aug 2020 09:48:21 -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:references:mime-version :content-disposition:in-reply-to; bh=QLslUeRIciwntaQ564DIh3O/aAuHeWr7CJpc7FVzFF4=; b=r3todFcYoNLeeNiUlfCJvF30DpySGy+UulGl1njGzycb2wOW8bkKJl9Zam/ke+/Mz3 VLittP2LoiY5ONjBJRNjiSSiSEuvYz1mfCILhGuIN+c6ynl09X4sXp5FRBzqOouwYb0t XAZ8xEPyma5De1RSvPvxozhGa39+eqih0himXCw1AncSPPPZ1yEEGsrbUBwObLuESdx9 QNAyUIH0508RHvvclnn0dJHZAZrtFk/JWRkiAk5AJ5sR372RsmD2vnaMvyu6Dv685Pq6 XgiQ+0JnM5wYnZpdOxml/ShvSWCfkh/6duEXLelF4hE1hL3Bgdc31XXxMmW+Ypjc53tp 51/w== 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; bh=QLslUeRIciwntaQ564DIh3O/aAuHeWr7CJpc7FVzFF4=; b=l0sXhI6xKz2bQdY6H4+TYBC1GU3MwF7qbe1+6Ul5ij/NiLHwf4CUt/mZomlw221Lmc L93o6vprgSC61GrEC366iuJEYJ23jTWSZzRhG9yc8rVqYLut9keosMtBX8W1QYV6B7rX DijcIozLTrNvRzwpG3130k4ZNa3diBJZxyAkNVTm+pgX/csiTuEGGle3TCsTpSSZBou5 cVVLU1NC64UfacY4S811noLFfXwKNR7UeSycYP2ua3RgUBW9P+LP60SRRYqLbYouE5Gi SwjX60vEzpOyQQFLSM8XALZKLvKvMj3EnU0FN4wmvfnAqUL+axzTOtBBbBpxUt8Ueawo kV1A== X-Gm-Message-State: AOAM5306mBwl9XhFdE6EgiDkt2FLbS5SP3BLHxRCycw4EpbUVLxlFpue 9MA01WysV7xyv3Mh8ZRIYwd+1Q== X-Google-Smtp-Source: ABdhPJySVPkK1bscRCXtt/hie34EBTJ996BnuGSfEs2EYoBZbPcxuX3x0XeV4pcdjuaIMgJGYiUPog== X-Received: by 2002:a17:906:17c5:: with SMTP id u5mr8109718eje.453.1598806100736; Sun, 30 Aug 2020 09:48:20 -0700 (PDT) Received: from localhost (ip-86-49-253-216.net.upcbroadband.cz. [86.49.253.216]) by smtp.gmail.com with ESMTPSA id bc18sm4911327edb.66.2020.08.30.09.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Aug 2020 09:48:20 -0700 (PDT) Date: Sun, 30 Aug 2020 18:48:18 +0200 From: Tomas Vondra To: Alvaro Herrera Cc: Tatsuro Yamada , Julien Rouhaud , Pavel Stehule , PostgreSQL Hackers Subject: Re: list of extended statistics on psql Message-ID: <20200830164818.b4rl4uk6wzfzrsys@development> References: <20200829225436.atuttqilrcgppqio@development> <20200830163329.GA21915@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200830163329.GA21915@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Aug 30, 2020 at 12:33:29PM -0400, Alvaro Herrera wrote: >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()? > Either that or simply length() on the bytea value. >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? > I'd use the same approach as \d+, i.e. a separate column with the size. Maybe that'd mean too many columns, though. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services