Use of Indexes Against Views (179)
Oracle determines whether to use indexes for a query against a view by transforming
the original query when merging it with the view’s defining query.
In all possible cases, Oracle merges a query against a view with the view’s defining
query and those of any underlying views. Oracle optimizes the merged query as if you
issued the query without referencing the views. Therefore, Oracle can use indexes on
any referenced base table columns, whether the columns are referenced in the view
definition or in the user query against the view.
In some cases, Oracle cannot merge the view definition with the user-issued query. In
such cases, Oracle may not use all indexes on referenced columns.
檢視中使用索引
1. 當 Oracle 整合使用者提交的查詢語句與其中所引用檢視的定義語句並對整合結果進行轉化時,將決定此查詢如何使用索引.
2. Oracle 會盡可能地將使用者查詢及其中所引用檢視的定義查詢進行整合.Oracle 將最佳化整合後的語句,
就如同使用者提交的語句中沒有引用檢視一樣.因此,無論一列是被檢視的定義引用,還是被使用者提交的查詢引用,
Oracle 都可以使用建於基表列上的索引.
3. 有些情況下,Oracle 無法將使用者查詢與其中所引用檢視的定義查詢進行整合.此時 Oracle 可能無法使用全部被引用列上的索引.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-981770/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Validating Tables, Indexes, Clusters, and Materialized ViewsIndexZedView
- Use the following approach to create tables with constraints and indexes:APPAIIndex
- How To Use DBMS_ADVISOR.TUNE_MVIEW Tuning Materialized ViewsViewZed
- ARC179D Portable Gate
- DML ViewsView
- Rebuild IndexesRebuildIndex
- ORACLE INDEXESOracleIndex
- LeetCode-179-最大數LeetCode
- 8.1.1 V$ ViewsView
- 8.1.2 GV$ ViewsView
- Parallel query & viewsParallelView
- External Views (33)View
- Overview of Views (174)View
- Oracle - Tables/IndexesOracleIndex
- Reverse Key IndexesIndex
- ORACLE -> NULL & INDEXESOracleNullIndex
- Overview of Partitioned IndexesViewIndex
- Local Partitioned IndexesIndex
- Global Nonpartitioned IndexesIndex
- Extents in Indexes (19)Index
- [ARC179E] Rectangle Concatenation
- 翻譯(九)——Clustered Indexes: Stairway to SQL Server Indexes Level 3IndexAISQLServer
- What can men do against such reckless hate?AI
- barbajs-ViewsJSView
- Some Dictionary Views For ASMViewASM
- Views and Base Tables (243)View
- How Views are Stored (175)View
- How Views Are Used (176)View
- Mechanics of Views (177)View
- Dependencies and Views (180)View
- Object Views (182)ObjectView
- skip_unusable_indexesIndex
- The Secrets of Oracle Bitmap IndexesOracleIndex
- Restrictions on Create Bitmap IndexesRESTIndex
- Global Range Partitioned IndexesIndex
- Global Hash Partitioned IndexesIndex
- Maintenance of Global Partitioned IndexesAINaNIndex
- Overview of Indexes (194)ViewIndex