Primary Key in Oracle 11g Materialized view
Posted on 2011-03-09
When I create a Materialized view -- do queries on the Materialized view as efficient as the queries on a table with the same content of the Materialized view?
I created a Materialized view:
CREATE MATERIALIZED VIEW MYMATVIEW1
REFRESH FORCE ON DEMAND
START WITH SYSDATE NEXT SYSDATE + 1/24
SELECT X, Y, Z
How can I set the X field of the Materialized view as the primary key of the Materialized view? If I had a table in the same place, I could easily create a primary key for the field X on the same table.
Also how do I query the database to see when the Materialized view was last updated and how long it took to run/etc.?