問題描述
我知道物化視圖并且我正在使用它.我從未使用過索引視圖,但我會使用.它們之間有什么區別?
I know materialized view and I'm using it. I have never used indexed views but I will. What are the differences between them ?
推薦答案
SQL Server 的索引視圖始終保持最新.在 SQL Server 中,如果修改了視圖的基表,則視圖的索引也會在同一個原子事務中保持最新.
SQL Server’s indexed views are always kept up to date. In SQL Server, if a view’s base tables are modified, then the view’s indexes are also kept up to date in the same atomic transaction.
Oracle 提供了類似的東西,稱為物化視圖.如果 Oracle 的物化視圖是在沒有 **REFRESH FAST ON COMMIT**
選項的情況下創建的,那么物化視圖在其基表被修改時不會被修改.所以這是一個主要區別.雖然 SQL Server 的索引視圖始終保持最新,但 Oracle 的物化視圖可以是靜態的.
Oracle provides something similar called a materialized view. If Oracle’s materialized views are created without the **REFRESH FAST ON COMMIT**
option, then the materialized view is not modified when its base tables are. So that’s one major difference. While SQL Server’s indexed views are always kept current, Oracle’s materialized views can be static.
這篇關于SQL Server 索引視圖與 Oracle 物化視圖的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!