Allocation of Temporary Segments for Temporary Tables and Indexes (28)

tsinglee發表於2007-09-14

Oracle allocates segments for a temporary table when the first INSERT into that table is issued.
(This can be an internal insert operation issued by CREATE TABLE AS SELECT.) The first
INSERT into a temporary table allocates the segments for the table and its indexes,
creates the root page for the indexes, and allocates any LOB segments.
Segments for a temporary table are allocated in a temporary tablespace of the user
who created the temporary table.
Oracle drops segments for a transaction-specific temporary table at the end of the
transaction and drops segments for a session-specific temporary table at the end of the
session. If other transactions or sessions share the use of that temporary table, the
segments containing their data remain in the table.

1. 臨時表在第一次insert into(ctas)時 , Oracle給分配臨時段
2. 當事務結束時 , Oracle drops segments for a transaction-specific temporary table.
3. 當會話結束時 , Oracle drops segments for a session-specific temporary table.
4. 有其他事務或者會話共享臨時表時 , 臨時段依然保留著資料.

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-969414/,如需轉載,請註明出處,否則將追究法律責任。

相關文章