User Tools

Site Tools


sysadmin:postgresql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
sysadmin:postgresql [2014/11/25 08:46] – Query per occupazione disco delle tabelle ferodasysadmin:postgresql [2014/11/25 09:38] – [Occupazione disco per tabelle] - tolto LIMIT 20 feroda
Line 90: Line 90:
           END           END
       )::bigint AS estimated_row_count       )::bigint AS estimated_row_count
- 
       FROM (       FROM (
- 
         SELECT table_schema, table_name,          SELECT table_schema, table_name, 
             pg_relation_size('"' || table_schema || '"."' || table_name || '"') as size,             pg_relation_size('"' || table_schema || '"."' || table_name || '"') as size,
Line 98: Line 96:
             FROM information_schema.tables              FROM information_schema.tables 
             WHERE table_schema NOT IN ('information_schema', 'pg_catalog'             WHERE table_schema NOT IN ('information_schema', 'pg_catalog'
-        ORDER BY size DESC, total_size DESC LIMIT 20+        ORDER BY size DESC, total_size DESC
     ) AS basic_infos      ) AS basic_infos 
         JOIN pg_class         JOIN pg_class