IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Rowset -Multi Row fetch


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Tue Sep 13, 2011 6:28 pm
Reply with quote

Hi ,
I know that there are many pros to using Multi row fetch. Buts are there really any cons to using row set ?

i have a scenario , where i will be be running dynamic queries (have a webserive interface with dotnet ) based on some fields sent from the front end. The resultant can vary anywhere from zero to 2K . Is multirow fetch a good candidate for this?

Please let me know your thoughts.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Sep 13, 2011 6:56 pm
Reply with quote

by resultant do you mean result set anywhere from 0 to 2000 rows?
or do you mean something else.

multi-row fetch means
1. less calls to db2
2. less transmission of data
3. larger area required to contain the data.(row size X number of rows)
4. different handling of sqlcode and sqlerrcd(3) (never do spell that correctly)

now, do any of these considerations discount your use of mult-row fetch?
Back to top
View user's profile Send private message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Tue Sep 13, 2011 7:25 pm
Reply with quote

Limit your number of rows per multi-row fetch to be in the range of 10-100, so that you gain benefit of multi-row fetch.For more number of rows the benefit becomes negligible and you will also introduce overhead of having larger array of host variables to hold the fetched values. Thanks.
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Wed Sep 14, 2011 11:20 am
Reply with quote

@ dbzTHEdinosauer - yes i was referring to resultant , and as you can see in my OP i know the benifits of multi-row fetch. I was more intrested to know if at all there were any draw backs.

Eshwar thanks for your input. Are there any fixed factors that determine the range - like indexing etc ? or should it always be withing the ranges of 10 - 100
Back to top
View user's profile Send private message
Eshwar CICS

New User


Joined: 18 May 2011
Posts: 47
Location: India

PostPosted: Wed Sep 14, 2011 11:44 am
Reply with quote

Explore section 3.1.4 of the redbook available at below link

www.redbooks.ibm.com/abstracts/sg246465.html
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Sep 16, 2011 5:07 pm
Reply with quote

These might also be of your interest:

www.db2expert.com/downloads/db2os390/YLAIDUGMultiRowFetch.pdf
www.hiperformance-software.de/documents/DB2%20V8%20Multiple%20Row%20Fetch%20-%20Concepts%20V22.pdf
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts Code Multi Row fetch in PL1 program PL/I & Assembler 1
No new posts Need to fetch data from so many DB2 t... DB2 9
No new posts Selective extract of multi-record-typ... SYNCSORT 4
Search our Forums:

Back to Top