Home » SQL & PL/SQL » SQL & PL/SQL » Creating MAT view - Long running (Oracle 11g)
Creating MAT view - Long running [message #620899] Thu, 07 August 2014 00:09 Go to next message
Oracle_Walker
Messages: 71
Registered: January 2012
Location: United States
Member

Hi,

I am trying to create a materialized view, but it is running for long time and doesn't create the view. However i am able to create the view if total number of records is very less (< 100). But when the total number of records is more than 3000, it is unable to do so.

Please refer to the attached file for the query used.
Re: Creating MAT view - Long running [message #620900 is a reply to message #620899] Thu, 07 August 2014 00:14 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
post SQL & EXPLAIN PLAN
Re: Creating MAT view - Long running [message #620908 is a reply to message #620900] Thu, 07 August 2014 02:30 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How long does the SELECT statement itself take to return results?

Where did this CREATE MATERIALIZED VIEW command come from? Did you manually type it, or did you copy everything from CREATE ... SELECT from some other materialized view? Did you intentionally specify all its options? If so, why did you choose to refresh it ON DEMAND (which means that it'll be refreshed when you manually refresh it) and also specify START WITH and NEXT (which is used for automatic refreshes)?

Perhaps you'd want to start over. The first step is
create materialized view my_mv as select <your SELECT here>

If it is successfully created, fine. Don't go further until you read CREATE MATERIALIZED VIEW documentation and understand its options. Then add those you really need, instead of copy/pasting them because someone else used them so they'll be OK for me too.
Previous Topic: numeric for loop
Next Topic: recursive triggers.
Goto Forum:
  


Current Time: Sat Apr 20 00:55:18 CDT 2024