Show TOC

 Full BufferingLocate this document in the navigation structure


You use full buffering to load all the records of the table into the buffer when one record of the table is read. With full buffering, either the entire table is in the buffer, or the table is not in the buffer at all.


In this example, a program reads the record highlighted in red from table SCOUNTER. If the table is fully buffered, all the records of the table are loaded into the buffer. You can see this in the figure below.



The system sorts the buffered data records in the buffer by table key. Accesses to the buffered data can only analyze field contents up to the last specified key field for restricting the dataset to be searched.

The left-justified part of the key must be as large as possible in such accesses. For example, if you do not define the first key field, the system has to scan the full table. In this case, direct access to the database can be more efficient if the database has suitable secondary indexes .

When To Use Full Buffering

When you decide to fully buffer a table, you must take into account the size of the table, the number of read accesses, and the number of write accesses. Tables that are best suited to full buffering are rarely written and read frequently.

Full buffering is recommended in the following cases:

  • Small tables such as customizing tables that are mainly read.
  • Larger tables where large numbers of records are frequently read and rarely changed. But if these read accesses can be formulated with a selective WHERE condition using a database index , we recommend you dispense with the buffering.
  • Tables for which read accesses to non-existent records are frequently submitted. Since all the table records reside in the buffer, the system can determine directly in the buffer whether or not a record exists.