Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Rowset -Multi Row fetch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Rowset -Multi Row fetch
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: 6968
Location: porcelain throne

PostPosted: Tue Sep 13, 2011 6:56 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Rowset -Multi Row fetch
Reply with quote

Explore section 3.1.4 of the redbook available at below link

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

Senior Member


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

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

These might also be of your interest:

http://www.db2expert.com/downloads/db2os390/YLAIDUGMultiRowFetch.pdf
http://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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts Reading selected volumes of a multi-v... RickBig JCL & VSAM 6 Wed Jul 13, 2016 7:26 pm
No new posts JCL to fetch schedule status from act... parasmalik20 CA Products 1 Thu Jun 02, 2016 7:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us