Using xHarbour:

? valtype(AdsCacheRecords(50))

is indicating the return value is a logical (returns .t.). Is there a way to get the current cache size? Also, changing the cache size (from 1 to 9999) doesn't appear to make any noticeable speed difference when browsing a large database displaying 80 rows at one time. It doesn't appear that I am actually changing the cache size. Any suggestions? Are my parameters correct?


asked 31 Aug '12, 09:04

Gary's gravatar image

accept rate: 0%

edited 31 Aug '12, 09:37

Are you using Advantage Database Server (remote)? Or is this using local server? The reason I ask is because with local server, the read ahead record cache will typically not make much of a difference (it can help a bit in natural order scans but not much more). The big benefit with this caching is with remote server when it can transfer N records back to the client in a single request.

(31 Aug '12, 09:24) Mark Wilkins


I'm using the remote server. Is there documentation listing the ADS functions and parameters for use in xHarbour? With my call to AdsCacheRecords returning a logical, I assume my passed parameter is incorrect.


(01 Sep '12, 13:47) Gary


To benchmark speed, instead of browsing, try writing a test skipping through data. Most browses will try to fetch data in the most efficient manner --as they already know how many rows will be displayed, thus rendering adsCacheRecords() a non-factor in the equation.

This is actually a very interesting subject, I mean the subject of browsing from (x)harbor. Many other rdd factors come into play here that has little to do with ACE. If you like to share your code, I'll be glad to comment.

On the subject of documentation, I must say that ADS has the most excellent set of help files covering each and every ACE function lacking absolutely nothing, except that these Harbour wrappers don't necessarily follow the same naming or parameter count. Sybase didn't write the Harbour wrappers, thus they are mostly unaware of this fact. For what it's worth, I'm currently trying to contribute an initial paper documenting the available wrapper funcs and will share it as soon as it is ready.




answered 22 Sep '12, 09:05

Reinaldo's gravatar image

accept rate: 6%

I looked at the definition in the RDD, and it does appear to be defined to return a logical. It returns .T. if the call succeeds.

Unfortunately, there is no way to retrieve the current cache size.

To test it, the best thing might be to just time a loop that does a gotop followed by skip operations to EOF with different cache sizes. Testing it by paging around in a browser is a good subjective test, but it may be hard to pin down for sure what is actually happening.

On my own PC I just now tested (via the ACE API directly from a C program) skipping through a 40,000 record table. With the cache size set at 1, it took 3.97 seconds. With the cache size of 1,000, it took 0.12 seconds.

Another thing you can do to verify that the cache size is changing is to view the number of operations with on the server (you can see the total operation count in the configuration utility). For example, the aforementioned skip test with a cache size of 1 took 40,009 total operations on the server. With a cache size of 1,000, it took 50 operations.


answered 04 Sep '12, 08:21

Mark%20Wilkins's gravatar image

Mark Wilkins
accept rate: 26%

Where do I find the definitions in the RDD you talk about above? I would like to see the ADS functions available in xHarbour.


(04 Sep '12, 13:57) Gary

I do not know if there any documentation or not. The RDD was developed by the xHarbour community, and we have not worked with it. I was looking at it in my spare time to try to learn about it and see what it would take to update it. I simply downloaded the xHarbour source code ( and looked at it. There is a contrib folder with an rdd_ads folder under that.

(04 Sep '12, 14:06) Mark Wilkins

Thanks Mark

(04 Sep '12, 16:07) Gary
Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 31 Aug '12, 09:04

Seen: 2,297 times

Last updated: 22 Sep '12, 09:05

Advantage Developer Zone Contact Us Privacy Policy Copyright Info

Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.