偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

討論Oracle文檔學習經(jīng)驗

數(shù)據(jù)庫 Oracle
這里介紹在Oracle文檔上說:對于RBO來說,以from 子句中從右到左的順序選擇驅(qū)動表,即最右邊的表為第一個驅(qū)動表。

Oracle有很多值得學習的地方,這里我們主要介紹Oracle文檔,包括介紹RBO優(yōu)化器等方面。在Oracle文檔上說:對于RBO來說,以from 子句中從右到左的順序選擇驅(qū)動表,即最右邊的表為第一個驅(qū)動表,這是其英文原文:All things being equal RBO chooses the driving order by taking the tables in the FROM clause RIGHT to LEFT。

不過,在我做的測試中,從來也沒有驗證過這種說法是正確的。我認為,即使在RBO中,也是有一套規(guī)則來決定使用哪種連接類型和哪個表作為驅(qū)動表,在選擇時肯定會考慮當前索引的情況,還可能會考慮where 中的限制條件,但是肯定是與where中限制條件的位置無關(guān)。

如果我創(chuàng)建3個表:

  1. create table A(col1 number(4,0),col2 number(4,0), col4 char(30));  
  2. create table B(col1 number(4,0),col3 number(4,0), name_b char(30));  
  3. create table C(col2 number(4,0),col3 number(4,0), name_c char(30));  
  4. create index inx_col12A on a(col1,col2); 

執(zhí)行查詢:

  1. select A.col4  
  2. from B, A, C  
  3. where B.col3 = 10 
  4. and A.col1 = B.col1  
  5. and A.col2 = C.col2  
  6. and C.col3 = 5;  
  7. Execution Plan 

通過上面的這些例子,使我對Oracle文檔上的” All things being equal RBO chooses the driving order by taking the tables in the FROM clause RIGHT to LEFT”這句話持懷疑態(tài)度。此時,我也不能使用hints來強制優(yōu)化器使用nested loop,如果使用了hints,這樣就自動使用CBO優(yōu)化器,而不是RBO優(yōu)化器了。

【編輯推薦】

  1. 如何了解Oracle生成執(zhí)行計劃
  2. 詳細談?wù)揙racle表連接
  3. 分析Oracle索引掃描四大類
  4. 高手閑談Oracle索引掃描
  5. 快速了解Oracle哈希連接
責任編輯:佚名 來源: 博客園
相關(guān)推薦

2009-11-17 10:40:45

2011-09-09 09:50:40

Oracle

2009-11-19 14:34:23

Oracle Exis

2009-07-10 15:10:02

Java Swing經(jīng)

2009-11-20 15:19:29

Oracle Agil

2009-11-17 15:59:25

Oracle物化視圖

2009-12-16 14:32:14

Linux Mint系

2010-05-04 18:14:50

Oracle 性能工具

2009-11-17 13:06:57

Oracle Free

2009-11-20 13:29:59

Oracle數(shù)據(jù)庫恢復(fù)

2010-04-23 09:13:08

Oracle In-M

2009-12-29 12:50:24

Ubuntu root

2009-12-18 14:23:22

Fedora進程管理

2010-04-12 12:55:24

Oracle 安裝經(jīng)驗

2010-04-02 12:51:14

Oracle安裝

2010-04-28 17:29:07

Oracle字符集

2009-12-30 16:19:33

2009-07-14 17:01:24

JDBC基礎(chǔ)

2009-09-07 17:09:45

Linq To Sql

2009-09-08 15:27:08

Linq Select
點贊
收藏

51CTO技術(shù)棧公眾號