The table buffer uses the shared memory of the application server.
Technical Implementation and Buffer Access
The table buffer consists of a central administration structure, a table directory, and the data area. Individual generic areas of a generic buffered table are managed like autonomous, fully buffered tables.
The table buffer divides its storage into areas (extents) of variable length. The length of an extent is a multiple of a fixed block size (128 bytes in a Non-Unicode system and 256 bytes in a Unicode system). The buffer management places the contents of a buffered table into one or more extents.
The system sorts the table names alphabetically in the table directory. The data records of a generic or fully buffered table are transferred to the corresponding extent in one step, already sorted by the database. In case of a single-record buffered table, only one row is loaded at a time and the sorting takes place when the data is inserted into the buffer. In a buffer access, there is first a binary search for the corresponding table name in the table directory. Then there is a binary search for the corresponding data record in the extent.
The displacement of buffered tables is carried out asynchronously at certain fixed times. These times are defined dynamically depending on the number of accesses to the buffer. The time between two displacements depends on the buffer utilization factor.
The system displaces data if the free space in the buffer falls below a defined value or the access quality is not good enough at the time of access. The access quality depends on the number of accesses that can be satisfied directly from the buffer. An attempt is made to free a certain area of the buffer. The system displaces a large number of tables at certain times.
The tables accessed least frequently are displaced. The table accesses weigh differently, depending on the time of the access. Accesses lying further in the past weigh less than those that occur shortly before the displacement.
This method ensures that tables which are accessed frequently at a certain time and then not used again can be displaced from the buffer after a defined time.
The system treats the individual generic areas of the buffer of generically buffered tables as independent tables. This is the reason why some generic areas of a table can be displaced while other generic areas of the table are kept in the buffer.
The system reorganizes the buffer at certain intervals once the tables have been displaced, thus reducing buffer fragmentation.
The modifications made in the local buffers must be synchronized in distributed systems to keep the buffered data consistent. You can see the general procedure for synchronization in Synchronization of Local Buffers .
The effect of various ABAP commands on the local and global synchronization is described below.
Modifications with a WHERE condition place much greater load on buffer management than single row changes.