Temporary tables use temporary segments. Unlike permanent tables, temporary tables
and their indexes do not automatically allocate a segment when they are created.
Instead, segments are allocated when the first INSERT (or CREATE TABLE AS
SELECT) is performed. This means that if a SELECT, UPDATE, or DELETE is performed
so on) on a temporary table only when no session is currently bound to it. A session
gets bound to a temporary table when an INSERT is performed on it. The session gets
unbound by a TRUNCATE, at session termination, or by doing a COMMIT or ROLLBACK
and their indexes do not automatically allocate a segment when they are created.
Instead, segments are allocated when the first INSERT (or CREATE TABLE AS
SELECT) is performed. This means that if a SELECT, UPDATE, or DELETE is performed
before the first INSERT, then the table appears to be empty.
临时表使用临时段。不像永久表,临时表和它们的索引不会自动分配一个段当它们被创建时。
取代的是,段在第一次INSERT(或者CTAS)执行时分配。这意味着如果一个SELECT,UPDATE,
或者DELETE在第一次INSERT前执行,那么这个表接近是空的。
so on) on a temporary table only when no session is currently bound to it. A session
gets bound to a temporary table when an INSERT is performed on it. The session gets
unbound by a TRUNCATE, at session termination, or by doing a COMMIT or ROLLBACK
for a transaction-specific temporary table.
你可以执行DDL语句(ALTER TABLE,DROP TABLE,CREATE INDEX等)在一个临时表上,
仅当当前没有会话绑定它。一个会话获得了绑定到一个临时表当一个INSERT在上面执行时。
会话通过一个TRUNCATE来解脱绑定,当会话中断,或者执行一个COMMIT或者ROLLBACK
对一个指定事务的临时表。
Temporary segments are deallocated at the end of the transaction for
transaction-specific temporary tables and at the end of the session for session-specific
temporary tables