From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Tatsuro Yamada <tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: list of extended statistics on psql |
Date: | 2020-08-31 15:30:53 |
Message-ID: | 20200831153053.a343pjgumahiejhw@development |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Aug 31, 2020 at 10:28:38AM -0400, Alvaro Herrera wrote:
>On 2020-Aug-30, Tomas Vondra wrote:
>
>> On Sun, Aug 30, 2020 at 12:33:29PM -0400, Alvaro Herrera wrote:
>
>> > 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.
>
>Are you thinking in one size for all stats, or a combined size? If the
>former, then yes it'd be too many columns.
>
I wonder if trying to list info about all stats from the statistics
object in a single line is necessary. Maybe we should split the info
into one line per statistics, so for example
CREATE STATISTICS s (mcv, ndistinct, dependencies) ON ...
would result in three lines in the \dX output. The statistics name would
identify which lines belong together, but other than that the pieces are
mostly independent.
This would make it somewhat future-proof in case we add more statistics
types, because the number of columns would not increase. OTOH maybe it's
pointless and/or against the purpose of listing statistics objects.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2020-08-31 15:34:29 | Re: "cert" + clientcert=verify-ca in pg_hba.conf? |
Previous Message | Tomas Vondra | 2020-08-31 15:20:57 | Re: list of extended statistics on psql |