简体   繁体   English

Oracle 12c / SQL:“插入表a(从表b的x位置选择)”是否使用临时表?

[英]Oracle 12c/SQL: does “insert into table a (select from table b where x)” use temp tables?

We are wondering why our temp space is always reducing temporarily but a lot (and released again). 我们想知道为什么我们的临时空间总是总是暂时减少但又减少很多(然后又释放了)。 The command in question has the form 有问题的命令具有以下形式

insert into table a (fields) select fields from table b where condition

Does Oracle use a temp table for commands like these? Oracle是否对这些命令使用临时表? Manuals say "temp tables are only used for sorting", but we don't used a "order by" clause here. 手册中说“临时表仅用于排序”,但这里我们不使用“ order by”子句。

TEMP tablespace is also used for other operations such as "direct path read" and as overflow for PGA memory intensive operations. TEMP表空间还用于其他操作,例如“直接路径读取”,并作为PGA内存密集型操作的溢出。

dba_hist_active_sess_history.temp_space_allocated (11g+) - shows SQL with high TEMP consumption dba_hist_active_sess_history.temp_space_allocated(11g +)-显示具有较高TEMP消耗的SQL

dba_hist_tbspc_space_usage - shows periods of high temp consumption dba_hist_tbspc_space_usage-显示高温消耗时段

DBA_HIST_ACTIVE_SESS_HISTORY.pga_allocated can be used to show which SQL use the most PGA. DBA_HIST_ACTIVE_SESS_HISTORY.pga_allocated可用于显示哪个SQL使用的PGA最多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM