From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal - psql - show longest tables |
Date: | 2013-07-22 19:11:08 |
Message-ID: | CAFj8pRCCV_NrCs=2NRETuAcEJBruATvM-FUrFA+tcmPu+LL0qw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2013/7/22 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Sun, Jul 21, 2013 at 12:47 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> Hello all
>>
>> I very often use a little bit adjusted psql system queries to
>> detection TOP N sized tables. I am thinking so it can be useful for
>> all users
>>
>> I propose a few new commands
>>
>> \dts [N|size] ... show N largest tables | show tables larger than size
>> ordered by size
>> \dis [N|size] ... show N largest indexes | show indexes larger than
>> size ordered by size
>> \dtst [N|size] ... show N largest total size | show tables where total
>> size is larger than size ordered by total size
>> \dtr [N] ... show N largest tables (ordered by rows)
>>
>> example:
>>
>> \dts 10 --- top 10 tables ordered by size
>> \dts 10MB -- tables larger than 10MB ordered by size
>>
>> Schema | Name | Type | Owner | Size
>> --------+-------------+-------+-------------+-------+-------------
>> public | eshop_users | table | eshop_owner | 16 kB
>> public | zamestnanci | table | eshop_owner | 16 kB
>>
>> What do you think about this proposal? Comments, notes?
>
> I think our \d commands are in inscrutable morass of indecipherable
> gobbledygook as it is, and this is only one more step down the road to
> complete insanity. :-(
these commands are targeted to advanced users, and four chars should
not be a problem.
It has a same advantage and disadvantage as "vim" UI. it is fast for
advanced users, and strange for beginners :(.
>
> Rather than just continuing to add more imposible-to-remember syntax,
> we really need a better design here.
do you have any tip?
Pavel
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2013-07-22 19:12:21 | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |
Previous Message | Greg Smith | 2013-07-22 19:06:26 | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |