views:

177

answers:

0

Hi I have three tables, t1, t2 and t3. 80% of the fields/columns are similar in these tables. Around 75,000 records are posted in table t1 and t2 on daily basis, totaling to 150,000. A process, say P123, is executed which moves 40-60 % records from t1 and t2 to t3 in a pair. The user searches frequently for records in all three tables with different criteria therefore 8-10 fields are indexed. Currently we have 250,000 records in t1 and t2 and 7,100,000 records in t3. The process P123 has become slower, it moves only 2-4 records in one second. Here is how P123 works, 1- First all pairs are fetched by their PK (one from t1 nd other from t2) 2- Loop through all pairs 3- Tran started 4- Both legs of a pair are copied from t1 and t2 to t3 with some additional static and dynamic values 5- Both legs are deleted from t1 and t2 6- Tran commit Of course in this process, oracle would have been taking time to update indexes, indexes are required to make searching faster. I need to make this process work faster. Any siggestion is welcomed like moving this process from client to server, running multiple processes at the same time with different pair ranges, DB level config etc.