
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.
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: