dbTalk Databases Forums  

Good values for PrefetchRows?

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Good values for PrefetchRows? in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Claudius Schmid
 
Posts: n/a

Default Good values for PrefetchRows? - 12-12-2003 , 04:13 PM






Hi!

I just realized, that I can speed up my application (connected to the DB
via a DSL-VPN) by changing the PREFETCHROWS to 100. What are good values
for this parameter and do I have to change the PREFETCHBUFFER parameter as
well? The ASA documentation is not very detailed in this section.

Claudius

PS: I'm using ASA 7

Reply With Quote
  #2  
Old   
Greg Fenton
 
Posts: n/a

Default Re: Good values for PrefetchRows? - 12-13-2003 , 12:44 AM






Claudius Schmid wrote:
Quote:
Hi!

I just realized, that I can speed up my application (connected to the DB
via a DSL-VPN) by changing the PREFETCHROWS to 100. What are good values
for this parameter and do I have to change the PREFETCHBUFFER parameter as
well?
The answer to this, as in most programming questions of this sort, is
"it depends". There are many variables involved:

- amount of memory available on the client
- speed of network
- amount of data to be transfered
- ways that your application uses the cursor
- etc...

If your configuration can handle it, then set the values quite high.
But if your application is using a cursor to fetch a small number of
rows, then looping through the cursor one at a time looking for those
rows is "expensive".

The best thing to do is to play around with the parameters and run your
test suite again (the one that uses 'real world' values under 'real
world' conditions).


Quote:
The ASA documentation is not very detailed in this section.
I just read the 7.0 version of the docs:

ASA Adaptive Server Anywhere Reference Manual
CHAPTER 3. Connection and Communication Parameters
Connection parameters
- PrefetchBuffer connection parameter [PBUF]

and
- PrefetchRows connection parameter [PROWS]

In my opinion, they are quite accurate. There are no suggested values
because, as stated above, different applications may use radically
different values (e.g. a "music collection" application on a CE device
vs. a retail cash register system running on a multi-CPU GNU/Linux server).

If you have any suggestions on what information is missing or what parts
should be reworded, post your comments and we'll forward them to the
docs team.


Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/



Reply With Quote
  #3  
Old   
Claudius Schmid
 
Posts: n/a

Default Re: Good values for PrefetchRows? - 12-13-2003 , 03:39 AM



Greg Fenton <greg.fenton_NOSPAM_ (AT) ianywhere (DOT) com> wrote in
news:3fdab715@forums-2-dub:

Quote:
I just read the 7.0 version of the docs:
In my opinion, they are quite accurate. There are no suggested values
because, as stated above, different applications may use radically
different values (e.g. a "music collection" application on a CE device
vs. a retail cash register system running on a multi-CPU GNU/Linux
server).

If you have any suggestions on what information is missing or what
parts should be reworded, post your comments and we'll forward them to
the docs team.
It would be great to hear some technical details about these parameters to know
exactly what you're doing by changing the values. I think trying out is one way,
but that's not very scientific ;-)

Claudius


Reply With Quote
  #4  
Old   
Greg Fenton
 
Posts: n/a

Default Re: Good values for PrefetchRows? - 12-15-2003 , 02:03 AM



Claudius Schmid wrote:
Quote:
It would be great to hear some technical details about these parameters to know
exactly what you're doing by changing the values. I think trying out is one way,
but that's not very scientific ;-)


How about this from the ASA 7.0.4 docs:

ASA Adaptive Server Anywhere User's Guide
PART 2. Working with Databases
CHAPTER 10. Using SQL in Applications
Working with cursors
- Prefetching rows

??

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/



Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.