oracle效能相關

來源:互聯網
上載者:User

標籤:

SQL執行過程

1.應用程式層-應用向資料庫發生SQL請求

2.資料庫代碼層-oracle軟體解析並最佳化SQL,管理鎖、安全、並發等

3.記憶體層-SGA(資料緩衝)、PGA(排序和散列 )

4.磁碟層-讀寫表、索引的資料,讀寫臨時工作區,重做以及其他日誌IO

最佳化過程

1.最小化請求

  • 最佳化應用代碼,如緩衝技術
  • 資料結構化以免資料庫過載
  • 保證網路品質
  • 最佳化資料庫實體設計,如索引、分區
  • 最佳化查詢器
  • 最佳化單條SQL語句效能

2.降低掙用

3.降低物理IO

  • 確保給oracle足夠的記憶體
  • 開啟AMM
  • 適當調整排序和串連數

4.最佳化磁碟IO

查看AWR報告

--登陸sqlplus
[[email protected] test]$ sqlplus /nolog
SQL> conn / as sysdba
Connected.
--呼叫指令碼,組建檔案
SQL> @?/rdbms/admin/awrrpt.sql

查看oracle相關績效參數

select count(*) from v$session; #當前的串連數

select value from v$parameter where name = ‘processes‘; --資料庫允許的最大串連數

show parameter processes; #最大串連 

alter system set processes = 300 scope = spfile;#修改最大串連數

select * from v$logfile;#記錄檔路徑

#重啟資料庫:
shutdown immediate;
startup;

 

oracle效能相關

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.