Tag: partition

How to find total size of partition table and its indexes on Postgresql?

How to find total size of partition table and its indexes on Postgresql?

select pg_size_pretty(sum(pg_total_relation_size(inhrelid::regclass))) from pg_inherits where inhparent='<schema>.<table>'::regclass; pg_size_pretty ---------------- 4410 GB

How to find total size of partition table on Postgresql?

How to find total size of partition table on Postgresql?

To find total size of partition table on Postgresql, one can run following query. Note this show table size only select pg_size_pretty(sum(pg_relation_size(inhrelid::regclass))) from pg_inherits where inhparent='<schema>.<table>'::regclass; pg_size_pretty ---------------- 3810 GB

How to change properties/attributes of partition table?

At times one would want to change properties/attributes of a table so new partitions are affected by change not the partitions already created, like example compression, change PCTFREE, default tablespace. -- enable compression for all operations and change PCTFREE SQL> ALTER TABLE scott.part_table MODIFY DEFAULT ATTRIBUTES COMPRESS FOR ALL OPERATIONS PCTFREE 5; -- Change default … Continue reading How to change properties/attributes of partition table?

Information on using dbms_stats.copy_table_stats

http://dioncho.wordpress.com/tag/copy_table_stats/