Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

buffering type?

Former Member
0 Kudos

hi all,

can anyone explain me with a scenario abt the buffering types

i can find these options.

1. single field buffering

2. generic buffering

3. fully buffered.

can anyone explain me when shall we go for single, generic nor fully buffered?




Former Member
0 Kudos


Whenever an Open SQL statement is used to read a record,

the data buffer is checked first to see whether it is there. If not, the data is read from the database.

If the table's attributes indicate that the data should be buffered,

the record is saved in RAM on the application server in data buffers.

Later, if that record is read again, it is read from the buffer instead of the database.

By buffering data, you increase performance in two important ways:

The programs using the buffered data run faster because they don't have to wait for it to come from the database. This reduces delays waiting for the database and the network that connects it.

The other programs that need to access the database run faster because there is less load on the database and less traffic on the network.

Three types of buffering are possible:

Full buffering

Generic buffering

Single-record buffering

Although you use a check box to indicate the buffering type, only one type can be selected at a time. If you choose more than one, an error message will be displayed.

There are two data buffers on each application server, and the buffering type chosen determines which buffer is used. On an application sever there are:

The generic record buffer

The single-record buffer

The generic record buffer is called TABL (short for "table"). The single-record buffer is TABLP ("P"' stands for "partial").

Full Buffering:

To activate the full buffering type, tickmark the Full check box.

When an attempt is made to read data from a fully buffered table,

the system looks in the TABL buffer for it.

If it is not found there, all rows are loaded from the database into TABL .

This happens whenever a select statement for it is executed, no matter how many records match the where clause.

Even if no records match, all are loaded into the buffer if the table is not already there or

if it has been invalidated due to buffer synchronization.

Loading of TABL does not occur with select single statements; only select/ endselect does this.

If the table is fully buffered and a select single statement is executed, no records are loaded into TABL.

However, if the table is already loaded into TABL, select single will read records from it.

During buffer synchronization, the entire table is invalidated if any record within it changes. The next time data is read the entire table is reloaded.

Full buffering is appropriate for small tables that seldom change.

Generic Buffering:

With generic buffering, a group of records is loaded into TABL instead of the entire table.

To activate this type of buffering, tickmark the Generic check box

and put a number n in the No. of Key Fields so that the n left-most fields of the primary key will group records.

When a record is read and n is 1, all records having the same value

in the first field of the primary key are loaded into the buffer.

When a record is read and n is 2, all records having the same value in the first two fields of the primary key are loaded

into the buffer.

Generic buffering is suitable for tables in which records are usually accessed in sets or groups.

Single Record Buffering:

With this type of buffering, select single picks one record into the single record buffer TABLP.

With this buffering type, records are only buffered when the select single statement is executed.

Select/endselect does not load or read TABLP.

Single-record buffering is appropriate for very large tables in which a small percentage of the records are read often.

For single-record buffering to work, records must be read using the select single statement.

There are two buffers: TABL (the generic record buffer) and TABLP (the single record buffer).

There are also two varieties of the select statement: select and select single. The select statement loads TABL and the select single statement loads TABLP.

When reading, select only reads TABL; it ignores TABLP. select single reads both buffers. This behavior is summarized in Figure 5.20. Remember that a record can only be in one buffer at a time because a table can only have one buffering type.

<b>Reward points</b>


0 Kudos


Single Record buffering is when you want to store one record a time in a Buffer.

Something like a Bank account, you will be doing so many operation with respect a bank account , one at a time, for them it is ideal that we store it in the buffer once and use it, and generally it will not be updated very regularly so we can operate using the buffer. (Here you need to provide all the Primary key fields)

Generic buffering is for buffering a set of records based on some fields this is like buffering a group of records. for example if you want to prcoess all bank accounts of say Perticular Branch then lets use the Branch code and get the details into a buffer.

Full table buffering is generally used for tables that are used to store some constant data that will not be modified for a long period. Like Country codes etc.



Former Member
0 Kudos


We have 3 types of buffering

There are the following types of buffering:

o single-record buffering

o generic area buffering

o full buffering

Single-record buffering should be selected when :

o For large tables where there are frequent single-record accesses (using SELECT SINGLE ...). The size of the records being accessed should be between 100-200 KB.

o For comparatively small tables for which the access range is large, it is normally advisable to opt for full buffering. Only one database access is required to load such a table for full buffering,

while single-record buffering calls for a very large number of table accesses.

And also check this matter.

Single-record buffering: Only the records of a table that are really accessed are loaded into the buffer

Single-record buffering should be used particularly for large tables where only a few records are accessed with SELECT SINGLE. The size of the records being accessed should be between 100 and 200 KB.

Full buffering is usually more suitable for smaller tables that are accessed frequently. This is because only one database access is necessary to load such a table with full buffering, whereas several database accesses are necessary for single-record buffering.

Check this link :

<b>Reward points for useful Answers</b>



Former Member
0 Kudos

Hi all,

thanxs for everyone for the quick response. i have assigned points for everyone.