SELECTa.datname,pg_size_pretty(pg_database_size(a.datid))ASsize,CAST(blks_hit/(blks_read+blks_hit+0.000001)*100.0AS NUMERIC(5,2))AScache,CAST(xact_commit/(xact_rollback+xact_commit+0.000001)*100.0AS NUMERIC(5,2))ASsuccess FROMpg_stat_databasea ORDERBYpg_database_size(a.datid)DESC;