[20220606]purge dba_recyclebin後臺操作.txt
[20220606]purge dba_recyclebin後臺操作.txt
--//連結
--//演示了執行purge dba_recyclebin中,執行緩慢的問題,主要是刪除物件太多導致的問題,簡單演示:
1.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.測試:
$ seq 100 | xargs -IQ echo "create table deptQ as select * from dept where rownum=1;" | sqlplus -s -l scott/book > /dev/null
$ seq 100 | xargs -IQ echo "drop table deptQ; " | sqlplus -s -l scott/book > /dev/null
SYS@book> @ 10046on 12
Session altered.
SYS@book> purge dba_recyclebin;
DBA Recyclebin purged.
SYS@book> @ 10046off
Session altered.
SYS@book> @ t
TRACEFILE
----------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/book/book/trace/book_ora_34572.trc
$ tkprof /u01/app/oracle/diag/rdbms/book/book/trace/book_ora_34572.trc a.prf
TKPROF: Release 11.2.0.4.0 - Development on Tue Jun 7 16:21:44 2022
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
--//使用tkprof整理分析,內容如下:
delete from RecycleBin$
where
bo=:1
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 100 0.00 0.00 0 0 0 0
Execute 100 0.01 0.01 0 300 710 100
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 200 0.01 0.01 0 300 710 100
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Number of plan statistics captured: 100
Rows (1st) Rows (avg) Rows (max) Row Source Operation
---------- ---------- ---------- ---------------------------------------------------
0 0 0 DELETE RECYCLEBIN$ (cr=3 pr=0 pw=0 time=70 us)
1 1 1 TABLE ACCESS FULL RECYCLEBIN$ (cr=3 pr=0 pw=0 time=17 us cost=2 size=52 card=1)
--// 如果RECYCLEBIN$物件不多,全表掃描問題不大,如果要刪除很多,你可以給RECYCLEBIN$建立索引:
create index RecycleBin$_bo on RecycleBin$(bo);
exec dbms_stats.gather_table_stats('SYS','RecycleBin$',cascade=>TRUE);
re-run purge
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2899248/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- InnoDB purge原理--哪些undo log可purge
- 【故障-ORACLE】定時清理dba_recyclebinOracle
- Oracle Recyclebin - purgeOracle
- MySQL purge 清理undoMySql
- onethink手機後臺,純手機操作
- 校園交易平臺後臺系統git操作全過程Git
- [20191203]後臺程式dbrm關閉.txt
- 實現後臺管理系統的操作日誌功能
- How to purge the Oracle Database Recycle BinOracleDatabase
- 利用 Laravel 中介軟體給後臺加個操作日誌Laravel
- Oracle Drop表(purge)恢復(ODU)Oracle
- Oracle Purge和drop的區別Oracle
- MySQL 5.5 -- innodb_purge_threadsMySqlthread
- [BUG反饋]預設後臺用cookie記錄操作路徑然後返回,可能導致後臺路徑洩露問題Cookie
- koahub微信商城原始碼市場部分操作後臺原始碼展示原始碼
- 直播平臺開發,操作成功後自動返回首頁
- 微信tocken後臺後臺儲存方法
- pandas操作txt檔案的方便之處
- outline操作指令碼_老版本.txt指令碼
- MySQL:Innodb purge執行緒略解MySql執行緒
- php頁面呼叫purge介面清除nginxcachePHPNginx
- Nginx系列教程:ngx_cache_purge模組Nginx
- DROP TABLE ** CASCADE CONSTRAINTS PURGEAI
- Purge Old Mongo Logs without User InterventionGo
- TP5後臺管理,thinkphp5後臺PHP
- Laravel 怎樣來實現,後臺管理員操作詳情 CURD 記錄?Laravel
- 帝國CMS網站不想顯示後臺的“商城”選單,如何操作?網站
- 部署平臺基本操作
- .NET後臺呼叫JS前臺JS
- Mac系統基礎操作教程:如何在Mac電腦檢視後臺程式?Mac
- 後臺任務
- NodeJS後臺NodeJS
- 後臺管理框架框架
- iOS 後臺定位iOS
- 後臺處理
- ORACLE後臺程式Oracle
- 後臺執行
- oracle 後臺程式Oracle