Consider this program flow. A calls B,C,D,E & F.All Sub programs B,C,D,E& F query a table say,TABA using the same predicate but for different columns.
A-> Select Col3,Col4,Col5 From TABA where Col1 = :predicate-1
B-> Select Col6,Col7,Col8 From TABA where Col1 = :predicate-1
and so on..
Now, If i combine all these 5 queries and convert it into a single query which select all columns reqd by these 5 programs and have the result in common storage so that all program can access the columns, what will be the impact in performance point of view. Will there be any improvement in performance?
TABA has approximately 130 cols, 25 M rows & 1526 pages.
Yes, i also agree that it will improve the performance.
If that 5 programs are independent programs and have different purposes, then the logic used in that five programs need to be brought into this main program also. Then, in this case programming concept of REUSABILITY is lost, COMPLEXITY of main program increases.