国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
Oracle臨時(shí)表空間過大問題解決
查詢數(shù)據(jù)庫服務(wù)器時(shí),發(fā)現(xiàn)數(shù)據(jù)庫服務(wù)器磁盤使用空間達(dá)到了98%,分析總共的數(shù)據(jù)文件也不可能達(dá)到如此大,經(jīng)過查詢發(fā)現(xiàn)原來臨時(shí)表空間的使用情況達(dá)到了 32G,導(dǎo)致磁盤空間使用緊張。搜索了相應(yīng)的文檔與資料后,查出臨時(shí)表空間主要使用在:
  - 索引創(chuàng)建或重創(chuàng)建。
  - ORDER BY or GROUP BY (這個(gè)是‘罪魁禍?zhǔn)?#8217;)
  - DISTINCT 操作。
  - UNION & INTERSECT & MINUS - Sort-Merge joins. - Analyze 操作
  - 有些異常將會(huì)引起temp暴漲(這個(gè)也很有可能)
  下面是重新創(chuàng)建一個(gè)臨時(shí)表空間,把原來的默認(rèn)臨時(shí)表空間drop掉(包括里面的臨時(shí)數(shù)據(jù)文件)再重新建立
  SQL> create temporary tablespace temp2
  2 tempfile '/home/oracle/oracle/product/10.2.0/oradata/hatest/temp02.pdf' size 512M reuse
  3 autoextend on next 640k maxsize unlimited;
  Tablespace created.
  SQL> alter database default temporary tablespace temp2;
  Database altered.
  SQL> drop tablespace temp including contents and datafiles;
  Tablespace dropped.
  (注意:由于臨時(shí)表空間的數(shù)據(jù)文件比較大,所以這步可能會(huì)花費(fèi)比較長(zhǎng)的時(shí)間)
  SQL> create temporary tablespace temp
  2 tempfile '/home/oracle/oracle/product/10.2.0/oradata/hatest/temp01.pdf' size 512M reuse
  3 autoextend on next 640K maxsize unlimited;
  Tablespace created.
  SQL> alter database default temporary tablespace temp;
  Database altered.
  SQL> drop tablespace temp2 including contents and datafiles;
  Tablespace dropped.
  SQL> exit
  以上的方法只是暫時(shí)釋放了臨時(shí)表空間的磁盤占用空間,是治標(biāo)但不是治本的方法,真正的治本的方法是找出數(shù)據(jù)庫中消耗資源比較大的sql語句,然后對(duì)其進(jìn)行優(yōu)化處理。下面是查詢?cè)趕ort排序區(qū)使用的執(zhí)行耗時(shí)的SQL
  Select se.username,se.sid,su.extents,su.blocks*to_number(rtrim(p.value))as Space,tablespace,segtype,sql_text
  from v$sort_usage su,v$parameter p,v$session se,v$sql s
  where p.name='db_block_size' and su.session_addr=se.saddr and s.hash_value=su.sqlhash and s.address=su.sqladdr
  order by se.username,se.sid
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
臨時(shí)表空間管理
Oracle Temp 臨時(shí)表空間
釋放臨時(shí)表空間實(shí)例
Oracle temp表空間爆滿的處理方法
oracle 臨時(shí)表空間的增刪改查
ORACLE臨時(shí)表空間總結(jié)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服