FrontBase logo

FrontBase Documentation

FrontBase logo

Backtrack:
  Welcome!
    4. Administering a FrontBase Server
      4.10. Tuning FrontBase
Updated: 20-Nov-2000
prevnext
Table of Contents

4.10.1. Table Caching

FrontBase's table caching mechanism

Table caching allows the developer or administrator to adjust how many of the rows of a given table that should be cached:

Min. row count, the minimum number of rows to be cached.
Max. row count, the maximum number or rows to be cached.
Percentage, the percentage of the total row count to be cached.
Persistent, keep the cache across transactions.
Preload, cache the table the first time the table is referenced.

The Persistent setting is available (and not always ON) because in some scenarios, you may wish to control the actual memory usage while allowing certain bursts of memory usage to occur. An example is report generation, where each transaction can span many SELECTs and will likely reference some tables that normally aren't in use that much. If Persistent is set to OFF for such tables, the cache will get loaded as used and then flushed when the transaction is COMMITted.

When should table caching be used?

Table caching is typically used on smaller "feeder tables" which can be cached 50% to 100% without an explosion in memory usage.

Adjusting table cache settings

Using the sql92 command-line tool, you can adjust table caches using the following extensions to SQL 92 provided by FrontBase. You can also adjust table cache settings using the FBManager and FBWebManager tools.

ALTER TABLE <table name> SET CACHE ([<lower>], [<upper>], [<percent>]);

Sets or adjusts the cache parameters for the given table. <lower> and <upper> are given as absolute row counts. The server will keep a minimum of <lower> rows and a maximum of <upper> rows in memory. Defaults are 2000 for <lower> and 20,000 for <upper>. The <percent> value tells the server to keep a varying number of rows in the cache, while still obeying the <upper> value. The default value for <percent> is 20.

ALTER TABLE <table name> SET CACHE PRESERVE FALSE | TRUE;

Instructs the server to maintain (TRUE) the cache for the given table even if there are no references to the table. FALSE means that the server will discard the cache when there are no more references to the given table.

ALTER TABLE <table name> SET CACHE PREPARE FALSE | TRUE;

Instructs the server to load (TRUE) the cache fully for the given table the first time the table is referenced. FALSE means that the cache is loaded as dictated by the actual use of the given table.

The above statements are transaction initiating. A COMMIT is required to make the changes visible to other users.


If you have feedback or questions on this document, please send e-mail to doc-feedback@frontbase.com. Please reference the section number and topic. Thanks!!

©2000 FrontBase, Inc. All rights reserved.