get table and index allocation size in oracle
27 June 2015
part 2 -> now with partitioned tables
Determining the size of a table can be a bit tricky within oracle. You can size all columns and add the values together. That woul give you an estimate of a row size. If you do that for all rows, you got the net size of data you are storing. This of cause does not account for index and table overhead. To get more realisitc view of the storage requirments, you can query the size, which oracle has allocated for your user objects. Even this is an estimate, since it does not account for fragmentation or other side effect. But you can see what is actually allocated within the tablespace.
TABLE_NAME | TABLESIZE | INDEXSIZE |
---|---|---|
DEPT | 65536 | 65536 |
EMP | 65536 | 65536 |
SALGRADE | 65536 | |
SAMPLE_DATASET_EVOLVE | 9437184 | 458752 |
SAMPLE_DATASET_FULLTEXT | 9437184 | 458752 |
SAMPLE_DATASET_INTRO | 9437184 | 458752 |
SAMPLE_DATASET_PARTN | 9437184 | 458752 |
SAMPLE_DATASET_REPOS | 65536 | 65536 |
SAMPLE_DATASET_XQUERY | 9437184 | 458752 |