What is the query to determine the table size of a database in Oracle?
Any object in Oracle that requires space is called a SEGMENT. Tables and indexes are both considered segments. A view, stored procedure and sequences are examples of objects that are not considered segments since only their definition is stored in the Data Dictionary.
If you want to see the size of any segment, you can query the DBA_SEGMENTS view. So to find the size of a table, use the following query:
SELECT bytes FROM dba_segments WHERE owner='SCOTT' AND segment_name='EMP';Keep in mind that this is the allocated space of the table.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.