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 > setFetchSize() method

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-07-05, 09:59
nikhilbhavsar nikhilbhavsar is offline
Registered User
 
Join Date: Dec 2005
Posts: 16
setFetchSize() method

Hi frnds,

For jdbc driver ....

how to improve dabase record fetch time using setFetchSize() method ??

Shld i use setfetchsize method with Statement object or with ResultSet object ???

What is the defference between the 2 methods ?
Reply With Quote
  #2 (permalink)  
Old 12-07-05, 16:25
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I thnk u shld set ftchsz to da nmbr of rcrds u r going to wrk wth at a time. For xmpl if u show rslts to ur usr 20 rws at a time u shud set ftchsz to twnty; zis won't dcrs da total ftch time bt wil brng da frst 20 rcrds fastr.

u shld setfetchsize wth Statement bcs with ResultSet its alrdy 2 late.

i hp ths is clr.
Reply With Quote
  #3 (permalink)  
Old 12-07-05, 23:47
nikhilbhavsar nikhilbhavsar is offline
Registered User
 
Join Date: Dec 2005
Posts: 16
Hi
Thnx for reply ..

I m not designing UI or Web based application.
It is XML based request - response application ...

The resultset can contain records of extremely varying size ranging from 2 to 4000 ...

The reply XML contains these records.

So what fetchsize i shld use ?

Currently i have stmt fetch size = 1000 and resultset.fetchsize = 20 ...
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