changeset 2509:6a1fb2d1bee7

Added ordering when display table sizes.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Tue, 08 Jun 2021 16:50:18 +0300
parents fe9788ce44ba
children cdc491306fef
files postgres.rst
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/postgres.rst	Wed Jun 02 16:39:36 2021 +0300
+++ b/postgres.rst	Tue Jun 08 16:50:18 2021 +0300
@@ -453,7 +453,7 @@
 
   SELECT pg_size_pretty(pg_relation_size('schemaname.tablename'));
 
-  SELECT pg_relation_size(t.schemaname ||'.'|| t.tablename), t.* FROM pg_tables t;
+  SELECT pg_relation_size(t.schemaname ||'.'|| t.tablename), t.* FROM pg_tables t ORDER BY 1 DESC;
 
 Largest table in the PostgreSQL database::