

backendid ) AS procpid, pg_stat_get_backend_activity ( s. Qsmarket|DBeaver 5.3.2 - Metadata|69603| 19:31:46| 19:34:55| 19:34:55|idle |SELECT i.*,c.relnamespace FROM pg_catalog.pg_inherits i,pg_catalog.pg_class c WHERE i.inhrelid=$1 AND c.oid=i.inhparent ORDER BY i.inhseqno | Qsmarket|DBeaver 5.3.2 - Main |69602| 19:31:46| 19:34:04| 19:34:04|idle |select current_database() as database,¶ pg_size_pretty(total_database_size) as total_database_size,¶ schema_name,¶ table_name,¶ pg_size_pretty(total_table_size) as total_table_size,¶ pg_size_pretty(table_size) as table_size,¶|

SELECT datname, application_name, pid, backend_start, query_start, state_change, state, query FROM pg_stat_activity WHERE datname = 'database_name' ĭatname |application_name |pid |backend_start |query_start |state_change |state|query | Listing from largest to smallest tables by number of rows :

Vigneshdb | 1586 MB | corpdata | table_eee | 1120 MB | 311 MB | 808 MB Vigneshdb | 1586 MB | corpdata | table_ccc | 640 kB | 112 kB | 488 kB Vigneshdb | 1586 MB | corpdata | table_bbb | 24 kB | 0 bytes | 16 kB Vigneshdb | 1586 MB | corpdata | table_aaa | 16 kB | 0 bytes | 8192 bytes tables where table_schema = current_schema () and table_name like 'table_%' order by total_table_size ) as sizes ĭatabase | total_database_size | schema_name | table_name | total_table_size | table_size | index_size Select current_database () as database, pg_size_pretty ( total_database_size ) as total_database_size, schema_name, table_name, pg_size_pretty ( total_table_size ) as total_table_size, pg_size_pretty ( table_size ) as table_size, pg_size_pretty ( index_size ) as index_size from ( select table_name, table_schema as schema_name, pg_database_size ( current_database ()) as total_database_size, pg_total_relation_size ( table_name ) as total_table_size, pg_relation_size ( table_name ) as table_size, pg_indexes_size ( table_name ) as index_size from information_schema.
