Product Documentation

c-treeACE V10.0 Update Guide

Previous Topic

Next Topic

KEEPOPEN - Enhanced File Open Performance

Memory files were designed with the option of remaining open after all users have closed the file. This support was required to avoid losing the contents of the file such that subsequent users can open the file and read and/or update the contents. This mode is referred to as KEEPOPEN.

When a non-memory file is normally physically closed, c-treeACE removes the data cache and/or index buffer entries associated with the file. A file is physically closed when all users that have the file open close the file.

Allow Files to Remain Open Even When Not Used

This KEEPOPEN support has been extended to all physical ISAM data files and their associated indexes. An advantage of this mode is to keep the files in the data cache and index buffers, even after all users have closed the file. Subsequent file opens benefit from having the cache contents immediately available. It also eliminates a physical open when the next user opens the file. This can result in significantly better performance when working with large numbers of files.

Files to be treated in this manner are specified in the server configuration file with one or more entries of the form:

KEEPOPEN_LIST <file spec>

where file <file spec> can be a file name or a partial name including wild card characters.

Upon file creation or physical open, the KEEPOPEN mode is applied to the data file and its indexes if:

  1. the file name matches a <file spec>, and;
  2. the file is a data file, and;
  3. the data file creation or open is part of an ISAM creation or open.

If all users have closed a KEEPOPEN file, the ctCLSNAM() API function can be called to close the data file and its associated indexes.

Additional Notes

  • Superfile ISAM members are also supported with this mode. A Superfile host can be created/opened with the KEEPOPEN attribute if it is created/opened as an ISAM file (without indexes).
  • If indexes are added to an ISAM data file with the KEEPOPEN attribute, then the new indexes inherit the KEEPOPEN attribute. Regardless of KEEPOPEN attributes, dropped indexes are either deleted or renamed depending on their TRANDEP attributes. If the index is renamed (RSTRDEL) then even if the index had KEEPOPEN attributes, the index is physically closed.

TOCIndex