| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | proposal - psql - show longest tables |
| Date: | 2013-07-21 04:47:32 |
| Message-ID: | CAFj8pRCOQK0Yh4_pk2of5gr8_tjkJSZXjevR-qJKagU83QA+=Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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?
Regards
Pavel Stehule
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit kapila | 2013-07-21 04:57:49 | Re: Error compiling Postgresql source code in Visual Studio 2010 |
| Previous Message | Noah Misch | 2013-07-21 01:06:23 | InvokeObjectPostAlterHook() vs. CommandCounterIncrement() |