Cache and buffer support

Caches that host in-memory databases must be large enough to contain the entire database, and every page in the database must reside in the cache, without any buffer replacement or I/O to disk. You cannot use caches that have been created:

Use sp_cacheconfig to create the cache for the in-memory database. Use disk init to divide the cache into in-memory devices, which are similar to disk devices, and support segments. You can bind one or more logical segments to in-memory devices, allowing you to bind objects to individual segments.

Consider the following before you bind any objects to a cache for in-memory or relaxed durability databases:

In-memory databases must be hosted by a single cache, but can reside on multiple in-memory devices created from that cache. Figure 1-2 shows imdb_cache cache, which contains a single in-memory storage device, imdb_dev:

Figure 1-2: Single cache hosting a single device

Image showing a single in-memory device, imdb_dev, inside an in-memory storage cache, imdb_cache

Figure 1-3 shows imdb_cache2 cache, which includes two in-memory data devices, imdb_dev1 and imdb_dev2, and a log device, imdb_logdev1:

Figure 1-3: Single cache hosting multiple devices

Image showing a single in-memory cache, imdb_cache2,  that contains three in-memory devices, imdb_dev1, imdb_dev2, and imdb_logdev1

Use create inmemory database to create the in-memory database directly on the logical devices. If your installation does not use segments to limit space for objects, create the database on the in-memory device to be used for the entire in-memory storage cache. For finer granularity in space management for individual objects and threshold procedure support, create the database and log on separate in-memory devices.

Use ddlgen to generate database and object definitions for in-memory and relaxed-durability databases. See the Utility Guide.

Use alter database to change the layout of existing in-memory databases. See the Reference Manual: Commands.