Oracle學習之sql語句執行過程分析

2022-04-01 10:17:39 字數 357 閱讀 2944

1.sql語句通過網路傳送給oracle例項

2.oracle server process接收到sql語句後進行必要的檢查,然後再shared pool中查詢sql語句及其執行計畫,

如果查詢到,則執行查詢到的執行計畫,如果未查找到相應的sql語句及執行計畫,則發生硬解析,選出最優的執行計畫.

3.如果是查詢資料,則首先在buffer chche 中查詢資料,如果查詢到資料,則將查詢的的資料通過網路返回給使用者,如果

在buffer cache  中未查找到資料則發生物理io,到dbf中去資料快取到buffer cache 中,通過buffer cache發給使用者。

4.如果是寫資料,則dbwriter會執行寫資料的操作。

oracle之sql語句優化

sql語句的優化 1.在where子句中使用 is null 或 is not null 時,oracle優化器就不能使用索引了.2.對於有連線的列,即使最有乙個是靜態的值,優化器也不會使用索引 比如 select from employss where first name last name b...

SQL學習之drop語句

刪除表刪除資料庫 truncate table 語句 菜鳥教程 sqldrop語句可以用於刪除索引 刪除表 和 刪除資料庫 刪除索引使用drop index語句 drop index index name on table namedrop index table name.index namedr...

Oracle運維常用SQL

oracle處理資料緩慢,系統相應緩慢,除了排查 網路,資料庫也不可忽視,下面一些語句可以篩查需要進行調優的sql oracle設定等。select from select sa.sql text,sa.sql fulltext,sa.executions 執行次數 round sa.elapsed...