Skip to Main Content

Oracle Database Discussions

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!

Materialized View & Temp Tables.

458308Oct 13 2005 — edited Oct 14 2005
Hi all,

Am currently trying to optimize my SQL.

Here is what I have

drop table table-1

drop table table-2

create a global temp table <table-1> (on commit preserve rows option)

create a table <table-2> based on global temp table.

This resultant table has got 100,00 rows.

The above two steps happens on a daily basis (drop and re-creation)

The data source for this is a remote DB

So, I tried to create MV for this

so, i created a MV for corresponding global temp table
and a MV for table-2

This takes more time than the original procedure.

Also,
i tried to overcome it by doing this

create the global temp table as in step -1
then, MV for the resultant table.

But this does not work as the global temp table is now empty,

So,

If i have some temp tables how can i create a MV based on this

Please let me know the best possible way to achive this both is terms of optimized run as well as min. time.

Hope Am clear.

Thanks

Sundar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2005
Added on Oct 13 2005
1 comment
680 views