oracle描述dept,一些关于oracle驱动表的描述
描述1:
Hi, hope this help:
The ‘driving’ table is the table we will join FROM — that is JOIN TO other
tables.??For example, lets say you have the query:
select * from emp, dept where emp.deptno = dept.deptno;
In this case the driving table might be DEPT, we would fetch rows from DEPT in a
full scan and then find the rows in EMP that match.??DEPT is the driving table.
The choice of a driving table made using many factors.??For example, in the
above query if there was an index on DEPT(DEPTNO) but not EMP(DEPTNO), we would
probably use EMP as the driving table — we would fetch rows from EMP and then
using the DEPT(DEPTNO) index — find their matches in the DEPT table.??Table
sizes, cardinality of column values, and other things can affect the choice of a
driving table (eg: HINTS).
When using the Rule Based Optimizer — the placement of tables in the FROM
clause is relevant.??We process the from clause from the RIGHT to the LEFT — we
would tend to pick a driving table from the end of the FROM list.??There is a
hint in the Cost Based Optimizer to have this happen as well.
When using CBO — the order of tables is not relevant (unless you hint it to
be).??We use the statistics and data dictionary to determine which table is best
to be used as the driving table.
描述2:
以一個比較兩本字典來做例子:
一本字典有索引目錄(dict a), 一本沒有(dict b)
現在要找出所有a開頭的單詞的異同
那么比較的時候,你會怎么比較?
合理的做法應該是以沒有索引的字典dict b開始, 找到a開頭的那一頁, 然后對于每個單詞, 通過使用索引在dict a中找到相應的條目
如果反過來, 效率會相同嗎?
驅動表,通俗的講就是先從哪個表開始檢索,良好的驅動表是成功優化的一半
總結
以上是生活随笔為你收集整理的oracle描述dept,一些关于oracle驱动表的描述的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php 缺少 wordpress,Wor
- 下一篇: c语言知道坐标求线段长度,C语言编写程序