SQL query - partition tables and it indexes
Oracle 19c - RAC - 19.24 version
I have the following query that is working well but need to add one more column - number of table partitions for each table. I need to show the following columns for all partition and non-partition tables in PXPROD schema.
Need column value:
owner, table_name, sum of all table_partititons, total size of table(if partition table - need sum(bytes) of all partitions), total size of all indexes(for each corresponding tables)
Example:
OWNER, TABLE_NAME, NUM_OF_ PARTS, TOTAL_TABLE_BYTES, TOTAL_INDEX_BYTES
PXPROD PHX_PAT_TXN 735 924995026944 76397182976
PXPROD PHX_CLAIM 364 30346083041 2232055575