If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 type 4 driver result set fetch size

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-11-11, 03:04
santosh.veerlapat santosh.veerlapat is offline
Registered User
 
Join Date: Aug 2011
Posts: 3
db2 type 4 driver result set fetch size

I m using jdbc code to retrieve records in db2 and using type 4 driver db2jcc.jar.
Does it supports setting for fetch size on statement or prepared statement or not?

Because i have 1 million records in my database,if the result set loads all at one shot then my java program will through out of memory exception.

thanks in advance
santosh kumar veerlapati
Reply With Quote
  #2 (permalink)  
Old 08-11-11, 03:21
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
when declaring a cursor and fetching from this cursor there is a blocking mechanism
I believe you get blocks of data, whenever you fetch new data
the block is limited in size (8k I believe)
should be verified..
there are some topics in doc regarding this.. see
http://publib.boulder.ibm.com/infoce.../t0005281.html
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 08-11-11, 06:29
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Not sure, I think you can control that with the setting of "enableRowsetSupport" described here: DB2 Database for Linux, UNIX, and Windows
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On