Segment
From Oracle FAQ
⧼orafaq-jumptonavigation⧽⧼orafaq-jumptosearch⧽
A segment is a database object that has space allocated to it - for example, a table, index, materialized view, etc. A segment consists of one or more extents allocated within a tablespace.
Segment types
Some of the available segment types are:
- CLUSTER
- INDEX
- INDEX PARTITION
- LOB PARTITION
- LOBINDEX
- LOBSEGMENT
- NESTED TABLE
- ROLLBACK
- TABLE
- TABLE PARTITION
- TYPE2 UNDO
Segment headers
The segment header is stored in the first block of the first extent. It contains:
List segments
Catalog views: USER_SEGMENTS and DBA_SEGMENTS show segment information. Note there is no ALL_SEGMENTS view. Example:
SELECT segment_name, segment_type, tablespace_name, extents FROM user_segments; SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME EXTENTS ------------ ------------ --------------- ---------- DEPT TABLE USERS 1 PK_DEPT INDEX USERS 1 EMP TABLE USERS 1 PK_EMP INDEX USERS 1 BONUS TABLE USERS 1 SALGRADE TABLE USERS 1 6 rows selected.
Also see
- Extent - contiguous set of data blocks allocated to a segment
Glossary of Terms | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | # |