Chapter 1: In-Memory Databases

In-memory databases run entirely in a named cache (that is, in the Adaptive Server® memory space), without using disk storage for data or logs. Because an in-memory database does not require I/O, its performance can be much better than a traditional, disk-resident database. In-memory databases are not designed for recovery: their transaction logs are written to the cache and not to disk, and any data changes are lost if the database fails. In-memory databases perform transactional logging for runtime rollback, and for other operations such as firing triggers, deferred mode updates, replication, and so on.

Disk-resident databases write to disk, and ensure that the transactional properties of atomicity, consistency, integrity, and durability (known as the ACID properties) are maintained. Durability refers to the persistence of transactions after they have committed. A traditional Adaptive Server database, also known as disk-resident, operates at full durability by writing its transaction log to disk when a transaction commits. This, along with data pages being written periodically to disk, ensures that all committed transactions are durable.

In-memory databases do not write data or log to disk, and trade the guarantee of transaction durability for performance improvements. In the event of a database failure, in-memory databases cannot be recovered. If your applications require data recoverability following a server failure or a normal shutdown, consider using a traditional Adaptive Server database.

With support for relaxed durability, Sybase® extends the performance benefits of an in-memory database to disk-resident databases. A disk-resident database operates at full durability to guarantee transactional recovery from a server failure. Relaxed-durability databases trade the full durability of committed transactions for enhanced runtime performance for transactional workloads.

The performance benefits of in-memory and relaxed-durability databases include:

Adaptive Server version 15.5 and later allows you to create these types of databases (illustrated in Figure 1-1, below):

Figure 1-1: Attributes of in-memory, relaxed-durability and disk-resident databases

Image showing the attributes associated with the types of databases. Venn diagram with the common attributes in the middle

*Greater than or equal to the cache size

NoteSee your Replication Server® documention for information about using in-memory and relaxed-durability databases and DML logging in a replicated environment.