Re: list of extended statistics on psql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tatsuro Yamada <tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp>, Julien Rouhaud <rjuju123(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 18:38:11
Message-ID: CAFj8pRDsiGozdoeqHC6d8disaY62Zihw5hL3dUHeFaDjyZAxNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

po 31. 8. 2020 v 18:32 odesílatel Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
napsal:

> On Mon, Aug 31, 2020 at 12:18:09PM -0400, Alvaro Herrera wrote:
> >On 2020-Aug-31, Tomas Vondra wrote:
> >
> >> 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.
> >
> >Yeah, that's what I'm suggesting. I don't think we need to repeat the
> >name/definition for each line though.
> >
> >It might be useful to know how does pspg show a single entry that's
> >split in three lines, though.
> >
>
> Ah, I didn't realize you're proposing that - I assumed it's broken
> simply to make it readable, or something like that. I think the lines
> are mostly independent, so I'd suggest to include the name of the object
> on each line. The question is whether this independence will remain true
> in the future - for example histograms would be built only on data not
> represented by the MCV list, so there's a close dependency there.
>
> Not sure about pspg, and I'm not sure it matters too much.
>

pspg almost ignores multiline rows - the horizontal cursor is one row every
time. There is only one use case where pspg detects multiline rows - sorts,
and pspg ensures correct content for multiline rows displayed in different
(than input) order.

Regards

Pavel

>
> regards
>
> --
> Tomas Vondra http://www.2ndQuadrant.com
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-08-31 18:42:21 Re: Clang UndefinedBehaviorSanitize (Postgres14) Detected undefined-behavior
Previous Message Alvaro Herrera 2020-08-31 18:34:45 Re: LogwrtResult contended spinlock