D_SETPAGES

SUMMARY
d_setpages(dbpages,ovpages)
int dbpages;
int ovpages;

ARGUMENTS

dbpages The number of pages for the database cache.

ovpages The number of pages for the transaction overflow cache.

DESCRIPTION
Function d_setpages is used to specify to the db_VISTA runtime system how
many pages to alocate for the database and transaction overflow virtual
memory caches. The default values are 16 database pages and 4 overflow
virtual memory pages. This function must be called prior to d_open.

Best performance can be achieved by using as high a dbpages value as you
have memory to support. The db_VISTA runtime utilizes a fast binary search
to determine if page is in the cache. Thus, if db pages were initially set
to 256, it would take db_vista no more than 8 comparisons to locate a page
in the cache.

The ovpages value should be keep low (at least 4 but generally less than
10) unless you application has many very long and complex transactions
which will split over into the transaction overflow file.

If you do not have enought memory to support the specified number of pages,
function d_open will return status S_NOMEMORY, in which case you should
reduse the specified amount any try again.


CURRENCY CHANGES
None

RETURN CODES

-20 S_SETPAGES d_setpages was called after the database was opened.

EXAMPLE


d_setpages(258,8);
d_open("tims","s");
..