TAILIEUCHUNG - ORACLE8i- P23

ORACLE8i- P23: We want information information.” Possibly you recognize these words as the primary interest of a somewhat clandestine group, and as told by a character called Number 2 to Patrick McGoohan’s character Number 6 (in the old TV show The Prisoner). Indeed, in this day, information is king, and the speedy, accurate, and reliable retrieval of this information is paramount. | 878 CHAPTER 19 ORACLE8i DATA WAREHOUSING FEATURES Here are some examples of altering Mviews ALTER MATERIALIZED VIEW mv_emp_date_agg PCTFREE 10 PCTUSED 60 STORAGE NEXT 100k ALTER MATERIALIZED VIEW mv_emp_date_agg ADD PARTITION p5 VALUES LESS THAN 2003 TABLESPACE data_2002 ALTER MATERIALIZED VIEW mv_emp_date_agg DISABLE QUERY REWRITE When you want to get rid of an Mview that you ve created it s as simple as using the DROP MATERIALIZED VIEW command. Appendix E has the syntax for this command and you ve already seen it used here in this chapter. DROP MATERIALIZED VIEW mv_emp_date_agg As you might expect if you want to drop an Mview in a schema other than your own you need the DROP ANY MATERIALIZED VIEW privilege. But I Already Have Aggregate Tables So you were ahead of the curve and you already have a warehouse full of tables that act like materialized views. Oracle rewards you by allowing you to create an Mview on an existing table. To do this you use the ON PREBUILT TABLE clause of the CREATE MATERIALIZED VIEW command. There are a few rules to follow for using existing aggregate tables The number of columns and column names in the table must match those in the query used in the CREATE MATERIALIZED VIEW command. The table must be in the same schema as the materialized view being created. The table must have the same name as the materialized view being created. Note Keep in mind that the Mview you create with the ON PREBUILT TABLE clause will replace the table of the same name. Thus that table will be converted into an Mview. Continued k Please purchase PDF Split-MJe 9e n to removebthisr watermark. MATERIALIZED VIEWS 879 Here s an example of use of the ON PREBUILT TABLE clause Create the table that we will convert to a MV CREATE TABLE emp_agg as SELECT TO_CHAR hiredate yyyy Hireyear COUNT Number Hired FROM EMP GROUP BY TO_CHAR hiredate yyyy Table created. Now convert this into a MV using the ON PREBUILT TABLE clause. Note the name of the Mview is the .

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.