Myth:Index Coalesce is less resource intensive
Myth:Index Coalesce is less resource intensive[@more@]在Google中搜尋”Index Internal”我們可以看到下面這個很好的文章。.
Microsoft PowerPoint - Oracle Index Internals.ppt
檔案格式: PDF/Adobe Acrobat - HTML 版
Classic Oracle Index Myths. Oracle B-tree indexes can become “unbalanced” over time. and need to be rebuilt … Index Coalesce.. More efficient, less resource intensive, less. locking issues than rebuild option …
它講到”coalesce index”比”rebuild index”消耗更少的資源。在我的測試中,coalesce index比rebuild index產生更多的redo size;如果對一些GB級別的索引進行coalesce,過多的redo會嚴重影響系統效能,且會很快把歸檔目錄填滿。還是在產品庫上少用的為好。
先在一個7M的表上進行測試
再在一個200M的表上進行測試。
非常明顯,coalesce產生過多的redo size.
結論:coalesce index is more resource intensive than rebuild index.
Microsoft PowerPoint - Oracle Index Internals.ppt
檔案格式: PDF/Adobe Acrobat - HTML 版
Classic Oracle Index Myths. Oracle B-tree indexes can become “unbalanced” over time. and need to be rebuilt … Index Coalesce.. More efficient, less resource intensive, less. locking issues than rebuild option …
它講到”coalesce index”比”rebuild index”消耗更少的資源。在我的測試中,coalesce index比rebuild index產生更多的redo size;如果對一些GB級別的索引進行coalesce,過多的redo會嚴重影響系統效能,且會很快把歸檔目錄填滿。還是在產品庫上少用的為好。
先在一個7M的表上進行測試
create table binzhang(id number not null,creation date not null,last_modified date not null);
insert into binzhang select binzhang_seq.nextval id,created,created from dba_objects
insert into binzhang select binzhang_seq.nextval id,created,created from dba_objects;
Commit
SQL> select bytes from user_segments where segment_name=’BINZHANG’;
BYTES
———-
7340032
create index binzhangidx1 on binzhang(creation) ;
create index binzhangidx2 on binzhang(last_modified) ;
update binzhang set creation=creation+124,last_modified=last_modified+124 where mod(id,12) in (1,3,5,7,9,11);
commit;
analyze index binzhangidx1 validate structure;
SQL> select name,value from v$statname s,v$mystat v where s.STATISTIC#=v.STATISTIC# and name=’redo size’;
NAME VALUE
—————————–
redo size 1288055828
SQL> alter index binzhangidx1 coalesce;
Index altered.
SQL> select name,value from v$statname s,v$mystat v where s.STATISTIC#=v.STATISTIC# and name=’redo size’;
NAME VALUE
———————— ———-
redo size 1294815880
SQL> alter index binzhangidx2 rebuild tablespace cr_data;
Index altered.
SQL> select name,value from v$statname s,v$mystat v where s.STATISTIC#=v.STATISTIC# and name=’redo size’;
NAME VALUE
———————— ———-
redo size 1299289400
Redo size used by coalesce 1294815880-1288055828=6760052
Redo size used by rebuild 1299289400-1294815880=4473520
OK. We can see that coalesce index generate more redo than rebuild for a 7M table.
...............................
再在一個200M的表上進行測試。
SQL> select bytes from user_segments where segment_name=’BINZHANG’;
BYTES
———-
201326592
SQL> update binzhang set creation=creation+124,last_modified=last_modified+124 where mod(id,12) in (1,3,5,7,9,11);
3083428 rows updated.
SQL> commit;
SQL> select name,value from v$statname s,v$mystat v where s.STATISTIC#=v.STATISTIC# and name=’redo size’;
NAME VALUE
——————————- ———-
redo size 568
SQL> alter index binzhangidx2 rebuild;
Index altered.
SQL> select name,value from v$statname s,v$mystat v where s.STATISTIC#=v.STATISTIC# and name=’redo size’;
NAME VALUE
————————— ———-
redo size 134919152
SQL> alter index binzhangidx1 coalesce;
Index altered.
SQL> select name,value from v$statname s,v$mystat v where s.STATISTIC#=v.STATISTIC# and name=’redo size’;
NAME VALUE
———————— ———-
redo size 496401172
............................................
非常明顯,coalesce產生過多的redo size.
結論:coalesce index is more resource intensive than rebuild index.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8225414/viewspace-899022/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資源路由resource index 不是get路由Index
- 7.51 COALESCE
- Myth 關於Git的學習筆記Git筆記
- 【Less】Less基本用法總結
- Laravel Resource Routes和API Resource Routes講解LaravelAPI
- Sqli-Labs:Less2-Less4SQL
- 【譯】Resource Hints
- 命令:less
- vite中配置less,vue3中配置lessViteVue
- Metasploit resource命令技巧
- Spring系列.Resource介面Spring
- DRM - Dynamic Resource MasteringAST
- Android resource linking failedAndroidAI
- Less-1
- Linux Less 命令Linux
- Resct配置less
- less走你
- 規模化敏捷LeSS(二):LeSS*隊實踐指南敏捷
- Index of /virtualboxIndex
- PostgreSQL:INDEXSQLIndex
- 規模化敏捷LeSS(二):LeSS團隊實踐指南敏捷
- Error-Expected resource of typeError
- vue_resource和axiosVueiOS
- Resource is out of sync with the file system
- oracle invisible index與unusable index的區別OracleIndex
- profile的resource limits和資源計劃resource_manager_plan的limitMIT
- Less用法小記
- less用法總結
- day12-less
- JAVASCRIPT. BUT LESS IFFYJavaScript
- less學習一
- less 語法教程
- vscode的gulp-less自動把less編譯成cssVSCode編譯CSS
- 帶讀 |《Designing Data-Intensive Applications》(中文:資料密集型系統設計)APP
- Python, pandas: how to sort dataframe by index// Merge two dataframes by indexPythonIndex
- create index .. onlineIndex
- index.jspIndexJS
- null與indexNullIndex
- [求助][iOS] 獲取 iOS 應用的 crash 報告,cpu_resource/diskwrites_resource/wakeups_resource 這些型別的如何分析iOS型別