SQL> create global temporary table t_global_temp(a int) on commit preserve rows; Table created. SQL> insert into t_global_temp values(1); 1 row created. ---提交前查询 SQL> select * from t_global_temp; A --- 1 SQL> select segment_name,segment_type from user_segments where segment_...
SQL> create global temporary table t_global_temp(a int) on commit preserve rows; Table created. SQL> insert into t_global_temp values(1); 1 row created. ---提交前查询 SQL> select * from t_global_temp; A --- 1 SQL> select segment_name,segment_type from user_segments where segment_...
SQL> create global temporary table t_global_temp(a int) on commit preserve rows; Table created. SQL> insert into t_global_temp values(1); 1 row created. ---提交前查询 SQL> select * from t_global_temp; A --- 1 SQL> select segment_name,segment_type from user_segments where segment_...
Specify GLOBAL TEMPORARY to indicate that the table is temporary and that its definition is visible to all sessions with appropriate privileges. The data in a temporary table is visible only to the session that inserts the data into the table. When you first create a temporary table, its table...
create table t1 parallel 8 nologging compress as select * from table1; 创建临时表 临时表为事务级,事务提交或回滚时,数据即被删除 create global temporary table t1(name varchar(10)) on commit delete rows; 临时表为会话级,表中数据一致保留直到当前会话结束。 create global temporary table t1(name ...
CREATE GLOBAL TEMPORARY TABLE TABLE_NAME ON COMMIT DELETE ROWS AS SELECT * FROM TABLE_NAME; 1. 使用全局临时表,由于不用写redo,插入速度比普通表快! 2. 安全性高,因为临时数据只有当前用户知道。 3. 全局临时表只是临时在数据库中存在,你可在见表的时候使用类似如下sql,逻辑处理完后写SQL,DROP掉就行 ...
SELECT SEGMENT_CREATED,TABLE_NAME FROM USER_TABLES WHERE SEGMENT_CREATED = 'NO'; 延迟段创建的限制条件有: ① 延迟段创建不支持的表类型包括:索引组织表(Index-Organized Tables)、簇表(Clustered Tables)、全局临时表(Global Temporary Tables)、会话级临时表(Session-Specific Temporary Tables)、内部表(Internal...
2.copy an existing table sql> create table table_name [logging|nologging] as subquery 3.create temporary table sql> create global temporary table xay_temp as select * from xay; on commit preserve rows/on commit delete rows 4.pctfree = (average row size - initial row size) *100 /average...
E、往如下全局临时表(GLOBAL TEMPORARY TABLE)插入数值型记录时,会话表GT_SESS_TAB(DBA_TABLES.DURATION='SYS$SESSION')和事务表GT_TRANS_TAB(DBA_TABLES.DURATION='SYS$TRANSACTION')这2类全局临时表均会生产临时段,且临时段类型为DATA(V$SORT_USAGE.SGTYPE='DATA') INSERT INTO GT_SESS_TAB(TMP_ID) VALUES...
0 0gcs_resources 0 0 0gcs_shadows 0 0 0dml_locks 3 48 748temporary_table_locks 0 0 UNLIMITEDtransactions 2 9 187branches 0 0 187cmtcallbk 0 2 187sort_segment_locks 0 1 UNLIMITEDmax_rollback_segments 11 11 187max_shared_servers 1 1 UNLIMITEDparallel_max_servers 0 2 4022 rows ...