View previous topic :: View next topic
|
Author |
Message |
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Eshwar CICS
New User
Joined: 18 May 2011 Posts: 47 Location: India
|
|
|
|
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 |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
@ 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 |
|
|
Eshwar CICS
New User
Joined: 18 May 2011 Posts: 47 Location: India
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
|