MVIEW huge temp space [message #532537] |
Wed, 23 November 2011 04:47 |
|
dee_bee_eh
Messages: 6 Registered: November 2011
|
Junior Member |
|
|
I run a query, takes 20 minutes or so, I traced it and can see no more then 20-30 mb of temp space required in the plan. Happy with this.
I developed it for use in a materialized view, however when I create the mview with the sql, the temp space required grows until it maxxes out. I increased the existing 10gb to 50gb but still maxxed out. Took the SQL out, reran it, ran in 20 minutes barely scratching the temp, I ran a "create table as <select>" and same behaviour as the SQL, barely touched the temp as per the plan. So the temp space blolwing is unique to the mview create.
Im working with mviews years on several sites and have never seen this.
What could be causing it.
|
|
|
|
|
|
Re: MVIEW huge temp space [message #532588 is a reply to message #532571] |
Wed, 23 November 2011 09:37 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
As a workaround, you could create the table the quick way, and then the materialized view with
CREATE MATERIALIZED VIEW....ON PREBUILT TABLE....
and then write your own job to drop and re-create it every day. That would get you going while you investigate the execution plan you are getting when you use the usual syntax.
|
|
|
|
Re: MVIEW huge temp space [message #532595 is a reply to message #532588] |
Wed, 23 November 2011 09:43 |
|
dee_bee_eh
Messages: 6 Registered: November 2011
|
Junior Member |
|
|
John Watson wrote on Wed, 23 November 2011 09:37As a workaround, you could create the table the quick way, and then the materialized view with
CREATE MATERIALIZED VIEW....ON PREBUILT TABLE....
and then write your own job to drop and re-create it every day. That would get you going while you investigate the execution plan you are getting when you use the usual syntax.
And yes, thats what Im currently doing, and I thought the same as you as well when I had a D'OH moment and realised I dont need an mvew once I have the table refreshed at night (Im doing a trunc and insert into).
I created a synonym for the ct's app and theyre querying that, if the mview thing gets sorted, I'll point it at the mview instead of the table.
ct is upgrading in the new year. hopefully its a bug and will be resolved but if not support should look at it in a call then.
|
|
|