Joe
Joe

Reputation: 13101

Oracle 12c - how to see all partitions and sub-partitions for some table and number of records for each

I got to explore table 't1'.

How to see:

This gives a good start but need more info (above):

select * from ALL_PART_TABLES where table_name = 't1'

Thanks.

Upvotes: 0

Views: 27940

Answers (1)

Valli
Valli

Reputation: 1450

The below query gives the number of rows in SUBPARTITION

select num_rows, PARTITION_NAME , SUBPARTITION_NAME 
  FROM ALL_TAB_SUBPARTITIONS
where table_name = 'yourtable';

The below query gives the number of rows in PARTITION and also the number of sub partitions.

select num_rows, PARTITION_NAME, SUBPARTITION_COUNT     
  FROM ALL_TAB_SUBPARTITIONS
where table_name = 'yourtable';

Upvotes: 1

Related Questions