久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Oracle 視圖與 Oracle 中的連接表

Oracle View vs joining tables in Oracle(Oracle 視圖與 Oracle 中的連接表)
本文介紹了Oracle 視圖與 Oracle 中的連接表的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我知道視圖是 Oracle 中底層表或表集的窗口.例如,如果我有一個通過連接多個表創建的視圖,當我從視圖中選擇數據時,視圖會執行實際的連接操作嗎?視圖的性能是否比連接多個表來獲取數據更好?在性能方面是否相同?

I understand that a view is a window to an underlying table or set of tables in Oracle. For instance if I have a view that is created by joining multiple tables , will the view perform the actual join operations when I select data from the view? Does a view perform better than joining multiple tables to fetch data or is it the same with respect to performance?

推薦答案

單個查詢和使用視圖的邏輯等效查詢之間通常沒有性能差異.

There is usually no performance difference between a single query and a logically equivalent query that uses views.

Oracle 具有優化器轉換,可以將視圖與外部查詢結合起來;謂詞推送、簡單和復雜的視圖合并等.將視圖視為構建大型查詢的文本宏,而不是返回行的函數.

Oracle has optimizer transformations that can combine views with the outer query; predicate pushing, simple and complex view merging, etc. Think of views more like a text macro that builds a large query, instead of a function that returns rows.

例如,在下面的查詢中,Oracle 可能足夠聰明,可以將主鍵列上的謂詞推送到視圖中.盡管視圖本身可能會返回數百萬行,但是當整個查詢運行時,Oracle 將首先在主鍵列上應用謂詞.

For example, in the below query Oracle would probably be smart enough to push the predicate on the primary key column into the view. Although the view by itself might return millions of rows, when the entire query is run Oracle will apply the predicate on the primary key column first.

select *
from view_returns_millions_of_rows
where primary_key_value = 1;

這篇關于Oracle 視圖與 Oracle 中的連接表的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

What SQL Server Datatype Should I Use To Store A Byte[](我應該使用什么 SQL Server 數據類型來存儲字節 [])
Interpreting type codes in sys.objects in SQL Server(解釋 SQL Server 中 sys.objects 中的類型代碼)
Typeorm .loadRelationCountAndMap returns zeros(Typeorm .loadRelationCountAndMap 返回零)
How to convert #39;2016-07-01 01:12:22 PM#39; to #39;2016-07-01 13:12:22#39; hour format?(如何將“2016-07-01 01:12:22 PM轉換為“2016-07-01 13:12:22小時格式?)
Convert multiple sub-queries to on join(將多個子查詢轉換為 on join)
How do I get the minute difference between 2 times in T SQL?(如何獲得 T SQL 中 2 次之間的微小差異?)
主站蜘蛛池模板: 国产免费又黄又爽又刺激蜜月al | 日日骚网 | 国产欧美精品一区二区色综合朱莉 | 日韩一区二区三区在线 | 久久婷婷国产麻豆91 | 国产成人网 | 亚洲一区二区三区在线 | 99精品热视频 | 国产成人jvid在线播放 | 久久久久久久久99精品 | 色婷婷狠狠 | 91精品国产91久久久 | 久久综合欧美 | av在线免费观看网站 | 久久久免费观看视频 | 久草资源 | cao在线 | 精品国产18久久久久久二百 | 精品久久99| 免费激情网站 | 欧美另类视频在线 | 91亚洲欧美| 91网在线观看 | 精品欧美一区二区三区 | 青青久草 | 久久久久久久久久久一区二区 | 精品久久一区 | 天天综合干 | 一区二区福利视频 | 欧美456| 91精品国产一区二区三区 | 亚洲精品久久久久国产 | 国产在线第一页 | 国产一区二区高清在线 | 免费激情网站 | 日韩欧美亚洲 | 在线一区视频 | 国产精品久久久亚洲 | 国产精品一区二区不卡 | 国产一区二区免费电影 | 人人爽日日躁夜夜躁尤物 |