By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,590 Members | 2,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,590 IT Pros & Developers. It's quick & easy.

About Multiple Cursor from Stored Procedure

P: n/a
Hi All
I am writing Import\Export routine in DB2 using stored procedure and
front end as JAVA.

For this I have two option
1) Writing five different stored procedure returning one cursor
(recordset each)
2) Writing one stored procedure returning five different cursor (five
different recordset).

So my question here is which is best option in this scenario and why?

Apr 5 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
i think your first idea seems good.
coz when many application access the procedure
there may be performance overhead

Apr 5 '06 #2

P: n/a
No My Import\Export routine will be accessed once daily in off peak
hours. But application will be accessed by many other users
concurrently.
then which is best.

Apr 6 '06 #3

P: n/a
Suresh wrote:
No My Import\Export routine will be accessed once daily in off peak
hours. But application will be accessed by many other users
concurrently.
then which is best.


It depends... you should implement both and see what works best for you.
I'd say that if always all 5 cursors are needed and accessed, it shouldn't
matter which way you go. If not all cursors are required, splitting them
into separate procedures could be better. But then, DB2 doesn't do
anything until you actually fetch from a cursor.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Apr 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.