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.
cancel
Showing results for 
Search instead for 
Did you mean: 

regarding buffering permissions

Former Member
0 Kudos

we have the 3 buffering permissions for data base table

those are 1.buffering not allowed

2. buffering allowed but not activated

3.buffering permitted.

can any body explain 2nd one i.e Buffering allowed but not activated???????????

what it means???????????

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

<b>Buffering not permitted:</b> Table buffering is not permitted, for example because application programs always need the most recent data from the table or the table is changed too frequently.

<b>Buffering permitted but not activated:</b> Buffering is permitted from the business and technical points of view. Applications which access the table execute correctly with and without table buffering. Whether or not table buffering will result in a gain in performance depends on the table size and access profile of the table (frequency of the different types of table access). Table buffering is deactivated because it is not possible to know what these values will be in the customer system. If table buffering would be advantageous for the table size and access profile of the table, you can activate it in the customer system at any time.

<b>Buffering activated:</b> The table should be buffered. In this case you must specify a buffering type.

<b>

reward points if helpful</b>

Regards

7 REPLIES 7

Former Member
0 Kudos

Hi,

Buffering is permitted from the business and technical points of view. Applications which access the table execute correctly with and without table buffering. Whether or not table buffering will result in a gain in performance depends on the table size and access profile of the table (frequency of the different types of table access). Table buffering is deactivated because it is not possible to know what these values will be in the customer system. If table buffering would be advantageous for the table size and access profile of the table, you can activate it in the customer system at any time.

Reward if useful!

Former Member
0 Kudos

Hi,

Buffering allowed but not activated if buffering is principally allowed for a table, but at the moment no buffering should be active. The buffering type specified in this case is only a suggestion.

Choose Buffering allowed but not activated ,if the users of this data can tolerate a 1-4 minute buffer latency.Dont forget this latency will not exist updating data because you will code bypassing buffer to get the latest information.

Regards,

Padmam.

0 Kudos

hi,

can u explain with an example?????????

plz??????????

Former Member
0 Kudos

hi

<b>Buffering not permitted:</b> Table buffering is not permitted, for example because application programs always need the most recent data from the table or the table is changed too frequently.

<b>Buffering permitted but not activated:</b> Buffering is permitted from the business and technical points of view. Applications which access the table execute correctly with and without table buffering. Whether or not table buffering will result in a gain in performance depends on the table size and access profile of the table (frequency of the different types of table access). Table buffering is deactivated because it is not possible to know what these values will be in the customer system. If table buffering would be advantageous for the table size and access profile of the table, you can activate it in the customer system at any time.

<b>Buffering activated:</b> The table should be buffered. In this case you must specify a buffering type.

<b>

reward points if helpful</b>

Regards

Former Member
0 Kudos

buffer allowed

buffer not allowed

fully buffere

Buffer Tables on the Application Server

You can considerably reduce the time required to access data by buffering it in the application server table buffer. Reading a single entry from table T001 can take between 8 and 600 milliseconds, while reading it from the table buffer takes 0.2 - 1 milliseconds.

Whether a table can be buffered or not depends its technical attributes in the ABAP Dictionary. There are three buffering types:

Resident buffering (100%) The first time the table is accessed, its entire contents are loaded in the table buffer.

Generic buffering In this case, you need to specify a generic key (some of the key fields) in the technical settings of the table in the ABAP Dictionary. The table contents are then divided into generic areas. When you access data with one of the generic keys, the whole generic area is loaded into the table buffer. Client-specific tables are often buffered generically by client.

Partial buffering (single entry) Only single entries are read from the database and stored in the table buffer.

When you read from buffered tables, the following happens:

An ABAP program requests data from a buffered table.

The ABAP processor interprets the Open SQL statement. If the table is defined as a buffered table in the ABAP Dictionary, the ABAP processor checks in the local buffer on the application server to see if the table (or part of it) has already been buffered.

If the table has not yet been buffered, the request is passed on to the database. If the data exists in the buffer, it is sent to the program.

The database server passes the data to the application server, which places it in the table buffer.

The data is passed to the program.

When you change a buffered table, the following happens:

The database table is changed and the buffer on the application server is updated. The database interface logs the update statement in the table DDLOG. If the system has more than one application server, the buffer on the other servers is not updated at once.

All application servers periodically read the contents of table DDLOG, and delete the corresponding contents from their buffers where necessary. The granularity depends on the buffering type. The table buffers in a distributed system are generally synchronized every 60 seconds (parameter: rsdisp/bufreftime).

Within this period, users on non-synchronized application servers will read old data. The data is not recognized as obsolete until the next buffer synchronization. The next time it is accessed, it is re-read from the database.

You should buffer the following types of tables:

Tables that are read very frequently

Tables that are changed very infrequently

Relatively small tables (few lines, few columns, or short columns)

Tables where delayed update is acceptable.

Once you have buffered a table, take care not to use any Open SQL statements that bypass the buffer.

The SELECT statement bypasses the buffer when you use any of the following:

The BYPASSING BUFFER addition in the FROM clause

The DISTINCT addition in the SELECT clause

Aggregate expressions in the SELECT clause

Joins in the FROM clause

The IS NULL condition in the WHERE clause

Subqueries in the WHERE clause

The ORDER BY clause

The GROUP BY clause

The FOR UPDATE addition

Furthermore, all Native SQL statements bypass the buffer.

Avoid Reading Data Repeatedly

If you avoid reading the same data repeatedly, you both reduce the number of database accesses and reduce the load on the database. Furthermore, a "dirty read" may occur with database tables other than Oracle. This means that the second time you read data from a database table, it may be different from the data read the first time. To ensure that the data in your program is consistent, you should read it once only and then store it in an internal table.

Sort Data in Your ABAP Programs

The ORDER BY clause in the SELECT statement is not necessarily optimized by the database system or executed with the correct index. This can result in increased runtime costs. You should only use ORDER BY if the database sort uses the same index with which the table is read. To find out which index the system uses, use SQL Trace in the ABAP Workbench Performance Trace. If the indexes are not the same, it is more efficient to read the data into an internal table or extract and sort it in the ABAP program using the SORT statement.

Use Logical Databases

SAP supplies logical databases for all applications. A logical database is an ABAP program that decouples Open SQL statements from application programs. They are optimized for the best possible database performance. However, it is important that you use the right logical database. The hierarchy of the data you want to read must reflect the structure of the logical database, otherwise, they can have a negative effect on performance. For example, if you want to read data from a table right at the bottom of the hierarchy of the logical database, it has to read at least the key fields of all tables above it in the hierarchy. In this case, it is more efficient to use a SELECT statement.

http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/4a813b680c250fe10000000a114084/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/47/12ba1cd9ed584a957e5cf6bf243625/content.htm

Table buffering is one of the most important performance-related features of Open SQL. A separate table buffer is maintained for each server process in the cluster. For more information, see Table Buffer in the Development Manual.

This component describes the monitored data for Open SQL table buffers.

Server

Monitored Unit

Description

BufferSize

The maximum size of the table buffer.

FreeSize

The remaining free space in the buffer in bytes.

HitRate

The ratio between buffer hits and requests.

Number of displacements

The total number of displacements in the buffer since buffer instance startup.

Buffering

The SAP System ensures that data transfer between the SAP System and the database system is as efficient as possible. To do this, it uses the following techniques:

· Table buffering. The program accesses data from the buffer of the application server.

· Database request buffering. Individual database entries are not read or passed to the database until required by an OPEN SQL statement.

When you analyze trace records, you should also examine the system's buffering mechanisms.

Table Buffering

For tables can be either partially or fully buffered (refer to Buffering Database Tables.), an OPEN SQL statement only accesses the database if the results of the statement are not already in the buffer Consequently, the SQL Trace does not contain a command or command sequence for every OPEN SQL statement. On the other hand, every SQL statement in the trace file has been sent to the database and executed.

Buffering of Database Requests

To keep the number of runtime-consuming PREPARE calls small, each an application's work processes hold a certain number of already translated SQL statements in a special buffer. By default, a process holds up to 250 statements.

If the system must execute a specific OPEN SQL, the system first checks whether this statement is stored in the "Statement cache". If the statement is in the cache, the system executes it immediately using a REOPEN (SELECT) or a REEXEC (INSERT, UPDATE, DELETE).

If the statement is not buffered, a PREPARE operation prepares it for the subsequent OPEN/EXEC. The system administers the buffer according to the LRU algorithm ("least recently used"). When space is needed for new statements, the statements that are rarely used are deleted. As a result of the LRU algorithm, the statement must prepare frequently used statements usually only once.

An application server buffers the DECLARE, PREPARE, OPEN, and EXEC requests within the cursor cache of one work process. As a result, once the system opens a cursor for a DECLARE operation, it can use this cursor over and over again within the same work process.

0 Kudos

can anybody explain with example so that it will be understood clearly?????????

plz????????????

Former Member
0 Kudos

hi subash,

The buffering status specifies whether or not a table may be buffered.

This depends on how the table is used.

For example:- On the expected volume of data in the table OR on the type of access to a table.

You should therefore select:-

- Buffering allowed but not activated if buffering is

principally allowed for a table, but at the moment no buffering

should be active.The buffering type specified in this case is only

a suggestion.

Buffering type:-

The buffering type defines whether and how the table should be buffered.

There are the following types of buffering:

single-record buffering

generic area buffering

full buffering

In generic area buffering, a number of key fields between 1 and no. of key fields-1 must be specified.

Kindly Reward points if data is useful,

Regards,

Mandeep.