Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can I create index on materialized views independently?

3018678Dec 7 2015 — edited Dec 9 2015

Hi All,

Can I create index on materialized views independently? I mean, after I created a materialized view can I create an index like a heap table as below?

CREATE MATERIALIZED VIEW KIOS.MV_TEST

NOCACHE

LOGGING

NOCOMPRESS

NOPARALLEL

BUILD IMMEDIATE

REFRESH COMPLETE ON DEMAND

WITH PRIMARY KEY

AS

SELECT * FROM V_TEST;

CREATE INDEX IND_TEST ON MV_TEST ON (COL1);

Also, I am wondering, when we create a MV. How does WITH PRIMARY KEY clause interacts with INDEXES?

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2016
Added on Dec 7 2015
7 comments
3,304 views