This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20.6
Managing priorities in database cache

Managing priorities in database cache  


 

 

The 4D database cache includes an automatic priority management mechanism that provides a high level of efficiency and performance for data access. Thanks to this mechanism, when space is needed to load new data in the cache, low priority cached data are released first, while higher priority cached data remain loaded.

This mechanism is fully automatic and usually, you will not have to worry about it. However, for specific cases it can be customized using a set of dedicated commands, which allow changing the priority of objects for the entire time the database is running, or temporarily for the current process. Note that these commands must be used carefully since they affect database performance.

The Cache manager selects data to remove from the cache as necessary using a priority system. The three kinds of objects that can be loaded in the cache have a different priority:

  • tables: all standard field data (numeric, dates, etc.), excluding blobs (see below). Default priority is medium.
  • blobs: all binary field data (text, picture, object and blobs) stored in the data file. Default priority is the lowest.
  • indexes: all field indexes, including keyword indexes and composite indexes. Since indexes are frequently accessed, they have a special status in the cache. Default priority is the highest. 

Default priorities usually provide the best performances. However, for specific cases you can customize the cache priorities using two sets of 4D commands:

These commands are available only on 4D Server or 4D in local mode.



See also 

Download HDI database
Get adjusted blobs cache priority
Get adjusted index cache priority
Get adjusted table cache priority

 
PROPERTIES 

Product: 4D
Theme: Cache Management

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v16 R2

 
ARTICLE USAGE

4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)