Mechanics of Views (177)

tsinglee發表於2007-11-10

Oracle stores a view’s definition in the data dictionary as the text of the query that
defines the view. When you reference a view in a SQL statement, Oracle:
1. Merges the statement that references the view with the query that defines the view
2. Parses the merged statement in a shared SQL area
3. Executes the statement
Oracle parses a statement that references a view in a new shared SQL area only if no
existing shared SQL area contains a similar statement. Therefore, you get the benefit of
reduced memory use associated with shared SQL when you use views.

檢視機制
當在SQL語句中引用了檢視時 , Oracle做了以下工作 :
1. 將引用了檢視的語句與檢視的定義語句整合為一個語句
2. 在共享 SQL 區解析整合後的語句
3. 執行語句

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-981561/,如需轉載,請註明出處,否則將追究法律責任。

相關文章