五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

重慶思莊oracle技術(shù)分享-dba_free_space視圖訪問變慢、消耗變高解決

2023-03-16 11:03 作者:D-Cycle  | 我要投稿

在11g數(shù)據(jù)庫版本,隨著數(shù)據(jù)庫的使用,垃圾數(shù)據(jù)的積累,訪問dba_free_space視圖的消耗會越來越高,訪問耗時越來越長

建議采取以下措施,優(yōu)化dba_free_space視圖的訪問效率

1、重建dba_free_space視圖

create or replace view DBA_FREE_SPACE
? ? (TABLESPACE_NAME, FILE_ID, BLOCK_ID,
? ???BYTES, BLOCKS, RELATIVE_FNO)
as
select ts.name, fi.file#, f.block#,
? ?? ? f.length * ts.blocksize, f.length, f.file#
from sys.ts$ ts, sys.fet$ f, sys.file$ fi
where ts.ts# = f.ts#
??and f.ts# = fi.ts#
??and f.file# = fi.relfile#
??and ts.bitmapped = 0
union all
select /*+ ordered use_nl(f) use_nl(fi) */
? ?? ? ts.name, fi.file#, f.ktfbfebno,
? ?? ? f.ktfbfeblks * ts.blocksize, f.ktfbfeblks, f.ktfbfefno
from sys.ts$ ts, sys.x$ktfbfe f, sys.file$ fi
where ts.ts# = f.ktfbfetsn
??and f.ktfbfetsn = fi.ts#
??and f.ktfbfefno = fi.relfile#
??and ts.bitmapped <> 0 and ts.online$ in (1,4) and ts.contents$ = 0
union all
select /*+ ordered use_nl(u) use_nl(fi) */
? ?? ? ts.name, fi.file#, u.ktfbuebno,
? ?? ? u.ktfbueblks * ts.blocksize, u.ktfbueblks, u.ktfbuefno
from sys.recyclebin$ rb, sys.ts$ ts, sys.x$ktfbue u, sys.file$ fi
where ts.ts# = rb.ts#
??and rb.ts# = fi.ts#
??and u.ktfbuefno = fi.relfile#
??and u.ktfbuesegtsn = rb.ts#
??and u.ktfbuesegfno = rb.file#
??and u.ktfbuesegbno = rb.block#
??and ts.bitmapped <> 0 and ts.online$ in (1,4) and ts.contents$ = 0
union all
select ts.name, fi.file#, u.block#,
? ?? ? u.length * ts.blocksize, u.length, u.file#
from sys.ts$ ts, sys.uet$ u, sys.file$ fi, sys.recyclebin$ rb
where ts.ts# = u.ts#
??and u.ts# = fi.ts#
??and u.segfile# = fi.relfile#
??and u.ts# = rb.ts#
??and u.segfile# = rb.file#
??and u.segblock# = rb.block#
??and ts.bitmapped = 0
/


2、清空數(shù)據(jù)庫回收站

sqlplus / as sysdba
purge dba_recyclebin;

說明:在11.2.0.4上測試有效

重慶思莊oracle技術(shù)分享-dba_free_space視圖訪問變慢、消耗變高解決的評論 (共 條)

分享到微博請遵守國家法律
理塘县| 甘洛县| 湟中县| 察雅县| 和田县| 曲阳县| 锦屏县| 晋宁县| 马山县| 阿克陶县| 博湖县| 阿瓦提县| 上栗县| 赤城县| 神木县| 兴义市| 天门市| 临颍县| 巴林右旗| 金秀| 罗甸县| 忻城县| 通许县| 满城县| 丹寨县| 广灵县| 惠水县| 台湾省| 汝州市| 津南区| 兴宁市| 沁源县| 兴业县| 武乡县| 岢岚县| 平江县| 夏河县| 苗栗县| 遂昌县| 道真| 横峰县|