From: | Tatsuro Yamada <tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, 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-10-29 01:34:44 |
Message-ID: | 027134cc-4c99-2878-4385-c0786283c5ea@nttcom.co.jp_1 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Tomas,
On 2020/10/29 4:06, Tomas Vondra wrote:
> On Wed, Oct 28, 2020 at 03:07:56PM +0900, Tatsuro Yamada wrote:
>> Hi Michael-san and Hackers,
>>
>> On 2020/09/30 15:19, Michael Paquier wrote:
>>> On Thu, Sep 17, 2020 at 02:55:31PM +0900, Michael Paquier wrote:
>>>> Could you provide at least a rebased version of the patch? The CF bot
>>>> is complaning here.
>>>
>>> Not seeing this answered after two weeks, I have marked the patch as
>>> RwF for now.
>>> --
>>> Michael
>>
>>
>> Sorry for the delayed reply.
>>
>> I re-based the patch on the current head and did some
>> refactoring.
>> I think the size of extended stats are not useful for DBA.
>> Should I remove it?
>>
>
> I think it's an interesting / useful information, I'd keep it (in the
> \dX+ output only, of course). But I think it needs to print the size
> similarly to \d+, i.e. using pg_size_pretty - that'll include the unit
> and make it more readable for large stats.
Thanks for your comment.
I addressed it, so I keep the size of extended stats with the unit.
Changes:
========
- Use pg_size_pretty to show the size of extended stats by \dX+
Result of \dX+:
===============
Schema | Name | Definition | N_distinct | Dependencies | Mcv | N_Size | D_Size | M_Size
-------------+------------+-----------------+------------+--------------+---------+----------+----------+------------
hoge1schema | hoge1_ext | a, b FROM hoge1 | built | built | built | 13 bytes | 40 bytes | 6126 bytes
public | hoge1_ext1 | a, b FROM hoge1 | defined | defined | defined | 0 bytes | 0 bytes | 0 bytes
public | hoge1_ext2 | a, b FROM hoge1 | defined | | | 0 bytes | |
(3 rows)
Please find the attached patch.
Regards,
Tatsuro Yamada
Attachment | Content-Type | Size |
---|---|---|
add_list_extended_stats_for_psql_by_dX_and_dXplus_r6.patch | text/plain | 12.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-10-29 01:59:52 | Re: Add important info about ANALYZE after create Functional Index |
Previous Message | Andres Freund | 2020-10-29 01:29:30 | Re: [PATCH] SET search_path += octopus |