Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number of Blocks / Block Size

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi all,

Is there a way find the number of actual blocks occupied by a certain table (maybe by using ROWID)?

Also, is it possible to get the total block size (in bytes) of Oracle? I tried:

[tt]select sum(bytes) from user_free_space;[/tt]

but am not sure if that is correct.

::)
DinaZ

 
For all of the datablocks in the database: SELECT sum(blocks) FROM dba_data_files;
For all of the datablocks allocated: SELECT sum(blocks) FROM dba_segments;
For all of the unallocated space: SELECT sum(blocks) from dba_free_space;
 
Oh! Back to your first question:

For the number of datablocks allocated to a specific table:

SELECT blocks FROM dba_segments
WHERE owner='YOUR_OWNER_NAME'
AND segment_name = 'YOUR_TABLE_NAME';
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top