The Storage Hierarchy
| Level | Meaning | Size |
|---|---|---|
| Data block | Smallest unit Oracle reads or writes | Usually 8 KB |
| Extent | A group of contiguous blocks | Grows as needed |
| Segment | All extents of one object (table, index...) | Whole object |
| Tablespace | Holds many segments | One or more datafiles |
Types of Segments
- Table and index segments (the ones you create)
- Undo segments
- Temporary segments created during sorts
- LOB segments for large objects
Look at the Space
Block Size
The default is 8192 bytes. It is set when the database is created and cannot be changed later for the main tablespaces.
Space Management
Modern tablespaces use locally managed tablespaces with automatic segment space management (ASSM). Oracle tracks free space inside blocks for you. This is the default, so you usually do not need to configure anything.
The High Water Mark
The high water mark (HWM) is the highest point a table has ever filled. A full table scan reads up to the HWM, even if you deleted most rows. That is why a table with few rows can still be slow.
Reclaim Space
| Method | Command | Notes |
|---|---|---|
| Shrink | ALTER TABLE t ENABLE ROW MOVEMENT; ALTER TABLE t SHRINK SPACE; | Online, needs ASSM tablespace |
| Move | ALTER TABLE t MOVE ONLINE; | Rebuilds the table. Indexes may need a rebuild on older versions. |
| Truncate | TRUNCATE TABLE t; | Fast, removes all rows, resets the HWM |
Conclusion
Blocks make extents, extents make segments, and segments live in tablespaces. Deleting rows does not lower the HWM, so shrink or move a table to reclaim space.

