顯示具有 Oracle Optimization 標籤的文章。 顯示所有文章
顯示具有 Oracle Optimization 標籤的文章。 顯示所有文章

2009/07/09

Rebuild Index

必須有足夠空間供舊索引及新索引同時存在, 新索引建立後,舊索引才會被拋棄
 
For Example :
 
alter index Index_Name rebuild
storage (initial 8M next 4M pctincrease 0)
tablespace "INDEX"

結論  : 定期重建索引有助於效能之提升
insert /*+ APPEND */ into table_name(column_name) 
select c1 from table
where c1 = ...
and c2 = ...
 

*在insert中加入APPEND提示,此一提示的語法有點像註解,
 新增資料時,不會試著再使用表格已使用的可用空間

結論 : 
一般而言,只有在可再用的空間太小,卻又需要新增大量資料時使用