Need Advise on Global Temporary tables or Materialized views or Views
RedeDec 9 2010 — edited Dec 9 2010Need advise on a plsql procedure working on.
I had 6 tables having 200,000 rows in total intially,but will get added a maximum 20,000 rows daily by a batch process.
I am writing a plsql code that takes an input ,for example customer_id, and is required to get all the data for that customer_id and
had to do some complex calculation that includes stepwise validations before giving the output.Now while doing the logic it has the get the data for that customer_id from all the tables.
There may be 100 records for that particular customer_id.
I need advise on the below options.
1.Use of global temporary tables get those 100 records and do the calculation part on that Global Temporary table.
2.Use of Views or Materialized views.
3.Using the Record Structures(like table types for those records) and then do the logic on them
As Performance is the key point here i would like pull all the data at once into memory and then do the calculations instead of hitting the database many times, this is my main idea(correct me if am wrong).Also please advise if there are any other options
I am using ORACLE 10G.
Thanks
Rede