View previous topic :: View next topic
|
Author |
Message |
yogalakshmi
New User
Joined: 20 Sep 2007 Posts: 17 Location: cheenai
|
|
|
|
Hi,
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.
i.e,
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.
Thank You in advance. |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Yes. It will improve the performance since you are reducing 5 DB2 calls to 1. |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi,
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.
Sushanth |
|
Back to top |
|
|
yogalakshmi
New User
Joined: 20 Sep 2007 Posts: 17 Location: cheenai
|
|
|
|
Thanks sushanth & Bharath for your replies.
Sushanth,
Yes.I should consider the COMPLEXITY of the main progrmam because as of now its work is to call other programs and return the response. |
|
Back to top |
|
|
|