Creating MAT view - Long running [message #620899] |
Thu, 07 August 2014 00:09 |
|
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 #620908 is a reply to message #620900] |
Thu, 07 August 2014 02:30 |
|
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.
|
|
|