TAILIEUCHUNG - Advanced SQL Database Programmer phần 3

Và kết quả là hợp lệ. Người sử dụng không thật sự nhìn thấy các bảng tạm thời, nhưng nó chắc chắn có, và không gian miễn là có một con trỏ mở cho SELECT. Nếu xem là vật chất, sau đó bất kỳ thay đổi dữ liệu (UPDATE, INSERT, hoặc DELETE) báo cáo ảnh hưởng đến bảng tạm thời, và đó là vô ích | Then it s just a matter of replacing the view name with the arbitrary name chosen for the temporary table SELECT MAX view_column1 FROM View1 Becomes SELECT MAX view_column1 FROM Arbitrary_name And the result is valid. The user doesn t actually see the temporary table but it s certainly there and takes up space as long as there is an open cursor for the SELECT. If a view is materialized then any data-change UPDATE INSERT or DELETE statements affect the temporary table and that is useless users might want to change Table1 but they don t want to change Arbitrary_name they don t even know it s there. This is an example of a class of views that is non-updatable. As we ll see it s not the only example. So . With view merge alone it is possible to handle most views. With view merge and temporary tables it is possible to handle all views. Permanent Materialized Views Since the mechanism for materializing views has to be there anyway an enhancement for efficiency is possible. Namely why not make the temporary table permanent In other words instead of throwing the temporary table out after the SELECT is done keep it around in case anyone wants to do a similar SELECT later. This enhancement is particularly noticeable for views based on groupings since groupings take a lot of time. 15 oracle DB2 Oracle and SQL Server all have a Permanent Materialized View feature although each vendor uses a different terminology. Here are the terms you are likely to encounter Vendor Terms that May Refer to Permanent Materialized Views DBMS VENDOR TERM DB2 Automated Summary Table AST . Materialized Query Table MQT Oracle Materialized View MV summary snapshot SQL Server Indexed View The terms are not perfect synonyms because each vendor s implementation also has some distinguishing features however I d like to emphasize what the three DBMSs have in common which happens to be what an advanced DBMS ought to have. First permanent materialized views are maintainable. Effectively

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.