What is “save undo”?
上次查询seg$表,发现了有一种段类型为save undo,顺便上网查了下,记录分享一下
看tom 的回答
save undo is undo saved for offlined tablespaces. It is also known as deferred rollback
A “Deferred Rollback” segment is created for a tablespace
when a tablespace is taken offline. Undo records are written
to the deferred rollback segment of a tablespace when undo is being applied to a
tablespace which is offline, hence, the undo
cannot be applied.
The undo stored in the deferred rollback segment is applied when
the tablespace comes back online. The deferred rollback segment
is automatically removed after the undo has been applied.
Deferred rollback segments always reside in the system tablespace.
试验一下
sys@ORCL> select * from seg$ where type#=2; no rows selected sys@ORCL> select * from v$tablespace; TS# NAME INC BIG FLA ENC ---------- ------------------------------ --- --- --- --- 0 SYSTEM YES NO YES 7 TEST YES NO YES 2 SYSAUX YES NO YES 4 USERS YES NO YES 6 EXAMPLE YES NO YES 9 TT YES NO YES 19 TBSLOGMNR YES NO YES 5 UNDOTBS2 YES NO YES 3 TEMP NO NO YES 20 SMAILTBS YES NO YES 24 INDEXTBS YES NO YES 11 rows selected. sys@ORCL> alter tablespace tt offline; Tablespace altered. sys@ORCL> select * from seg$ where type#=2; FILE# BLOCK# TYPE# TS# BLOCKS EXTENTS INIEXTS MINEXTS MAXEXTS EXTSIZE EXTPCT USER# LISTS ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- GROUPS BITMAPRANGES CACHEHINT SCANHINT HWMINCR SPARE1 SPARE2 ---------- ------------ ---------- ---------- ---------- ---------- ---------- 1 68209 2 0 8 1 5 1 2147483645 128 0 0 0 0 0 0 0 0 5 sys@ORCL> alter tablespace tt online; Tablespace altered. sys@ORCL> select * from seg$ where type#=2; no rows selected
上一篇: where is null 走索引
下一篇: 如何看待sql执行计划里的cost
对不起,这篇文章暂时关闭评论。