<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: buffering in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/buffering/m-p/2879288#M676150</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are the following types of buffering:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;single-record buffering&lt;/P&gt;&lt;P&gt;generic area buffering&lt;/P&gt;&lt;P&gt;full buffering&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Single-record buffering&lt;/P&gt;&lt;P&gt;With this kind of buffering, only the records of a table which are actually accessed are loaded into the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This kind of buffering requires less storage space in the buffer than full buffering. However, greater organization is necessary and considerably more database accesses are necessary for loading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an as yet unbuffered record is accessed with SELECT SINGLE, a database access occurs to load the record. If the table does not contain a record for the specified key ('no record found'), this record is noted as nonexistent in the buffer. If a further attempt is made to access this record, a renewed database access can be avoided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When should single-record buffering be selected?&lt;/P&gt;&lt;P&gt;For large tables where there are frequent single-record accesses (with SELECT SINGLE ...). The size of the records being accessed should be between 100-200 KB.&lt;/P&gt;&lt;P&gt;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, whilst single-record buffering calls for a very large number of table accesses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generic buffering&lt;/P&gt;&lt;P&gt;In a read access to a record of a generically buffered table, all the records whose left-justified part of the key (generic area) corresponds are loaded into the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this type of buffering is selected, the generic area must be defined by specifying a number n of key fields. The first n key fields of the table then define the generic key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of key fields to be entered must lie between 1 and the number of key fields -1. For example, only values between 1 and 5 are permitted for a table with 6 key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When should generic buffering be selected?&lt;/P&gt;&lt;P&gt;A table should be buffered generically if usually only certain areas of the table are required. The individual generic areas are treated like independent tables which are fully buffered. Please also read the text about full buffering.&lt;/P&gt;&lt;P&gt;The generic key area should be selected so that the generic areas are not too small to prevent too may generic areas being produced. If there are only a few records per generic area, it is more efficient to use full buffering.&lt;/P&gt;&lt;P&gt;Generic buffering only makes sense if the table is accessed by a specified generic key. If, when an access takes place, a field of the generic key is not supplied with a value, the buffer is ignored and the records are read directly from the database.&lt;/P&gt;&lt;P&gt;Language-specific tables are an example of a good use of generic buffering (with the language key field as generic key area).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Full buffering&lt;/P&gt;&lt;P&gt;With full buffering, either the complete table or none of the table is in the buffer. If a read access is made to a record, all records of the table are transferred to the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When should you select full buffering?&lt;/P&gt;&lt;P&gt;For tables up to 30 KB in size. If a table is accessed frequently, but all accesses are read accesses, this value can be exceeded.&lt;/P&gt;&lt;P&gt;For larger tables where large numbers of records are frequently accessed. However, if the application program is able to formulate an extremely selective WHERE condition using a database index, it may be advisable to dispense with full buffering.&lt;/P&gt;&lt;P&gt;For tables with frequent accesses to data not contained in the table. Since all records are contained in the buffer, a quick decision can be made as to whether or not the table contains a record for a specific key.&lt;/P&gt;&lt;P&gt;When considering whether a table should be fully buffered, you should take three aspects into account: the size of the table, the number of read accesses, and the number of write accesses. Tables best suited to full buffering are small, frequently read, and rarely updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SaiRam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2007 07:19:53 GMT</pubDate>
    <dc:creator>former_member196280</dc:creator>
    <dc:date>2007-09-26T07:19:53Z</dc:date>
    <item>
      <title>buffering</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/buffering/m-p/2879286#M676148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our Application &amp;amp; Data server is same.&lt;/P&gt;&lt;P&gt;If I set buffering in Table how it will work..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 05:20:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/buffering/m-p/2879286#M676148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T05:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: buffering</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/buffering/m-p/2879287#M676149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Table buffering&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Advantages of buffering&lt;/P&gt;&lt;P&gt;Concept of buffering&lt;/P&gt;&lt;P&gt;Buffering types&lt;/P&gt;&lt;P&gt;Buffer synchronization&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Buffering allows you to access data quicker by letting you&lt;/P&gt;&lt;P&gt;access it from the application server instead of the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Advantages of buffering&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table buffering increases the performance when the records of the table are read. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As records of a buffered table are read directly from the local buffer of the application server on which the accessing transaction is running, time required to access data is greatly reduced. The access improves by a factor of 10 to 100 depending on the structure of the table and on the exact system configuration. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the storage requirements in the buffer increase due to further data, the data that has not been accessed for the longest time is displaced. This displacement takes place asynchronously at certain times which are defined dynamically based on the buffer accesses. Data is only displaced if the free space in  the buffer is less than a predefined value or the quality of the access is not satisfactory at this time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Entering $TAB in the command field resets the table buffers on the corresponding application server. Only use this command if there are inconsistencies in the buffer. In large systems, it can take several hours to fill the buffers. The performance is considerably reduced during this time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Concept of buffering&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The R/3 System manages and synchronizes the buffers on the individual application servers. If an application program accesses data of a table, the database interfaces determines whether this data lies in the buffer of the application server. If this is the case, the data is read directly from the buffer. If the data is not in the buffer of the application server, it is read from the database and loaded into the buffer. The buffer can therefore satisfy the next access to this data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The buffering type determines which records of the table are loaded into the buffer of the application server when a record of the table is accessed. There are three different buffering types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With full buffering, all the table records are loaded into the buffer when one record of the table is accessed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With generic buffering, all the records whose left-justified part of the key is the same are loaded into the buffer when a table record is accessed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With single-record buffering, only the record that was accessed is loaded into the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Buffering types&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With full buffering, the table is either completely or not at all in the buffer. When a record of the table is accessed, all the records of the table are loaded into the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you decide whether a table should be fully buffered, you must take the table size, the number of read accesses and the number of write accesses into consideration. The smaller the table is, the more frequently it is read and the less frequently it is written, the better it is to fully buffer the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Full buffering is also advisable for tables having frequent accesses to records that do not exist. Since all the records of the table reside in the buffer, it is already clear in the buffer whether or not a record exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data records are stored in the buffer sorted by table key. When you access the data with SELECT, only fields up to the last specified key field can be used for the access. The left-justified part of the key should therefore be as large as possible for such accesses. For example, if the first key field is not defined, the entire table is scanned in the buffer. Under these circumstances, a direct access to the database could be more efficient if there is a suitable secondary index there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With generic buffering, all the records whose generic key fields agree with this record are loaded into the buffer when one record of the table is accessed. The generic key is a left-justified part of the primary key of the table that must be defined when the buffering type is selected. The generic key should be selected so that the generic areas are not too small, which would result in too many generic areas. If there are only a few records for each generic area, full buffering is usually preferable for the table. If you choose too large a generic key, too much data will be invalidated if there are changes to table entries, which would have a negative effect on the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A table should be generically buffered if only certain generic areas of the table are usually needed for processing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Client-dependent, fully buffered tables are automatically generically buffered. The client field is the generic key. It is assumed that not all of the clients are being processed at the same time on one application server. Language-dependent tables are a further example of generic buffering. The generic key includes all the key fields up to and including the language field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The generic areas are managed in the buffer as independent objects. The generic areas are managed analogously to fully buffered tables. You should therefore also read the information about full buffering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Single-record buffering is recommended particularly for large tables in which only a few records are accessed repeatedly with SELECT SINGLE. All the accesses to the table that do not use SELECT SINGLE bypass the buffer and directly access the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you access a record that was not yet buffered using SELECT SINGLE, there is a database access to load the record. If the table does not contain a record with the specified key, this record is recorded in the buffer as non-existent. This prevents a further database access if you make another access with the same key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You only need one database access to load a table with full buffering, but you need several database accesses with single-record buffering. Full buffering is therefore generally preferable for small tables that are frequently accessed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Synchronizing local buffers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table buffers reside locally on each application server in the system. However, this makes it necessary for the buffer administration to transfer all changes made to buffered objects to all the application servers of the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a buffered table is modified, it is updated synchronously in the buffer of the application server from which the change was made. The buffers of the whole network, that is, the buffers of all the other application servers, are synchronized with an asynchronous procedure.&lt;/P&gt;&lt;P&gt;Entries are written in a central database table (DDLOG) after each table modification that could be buffered. Each application server reads these entries at fixed time intervals.&lt;/P&gt;&lt;P&gt;If entries are found that show a change to the data buffered by this server, this data is invalidated. If this data is accessed again, it is read directly from the database. In such an access, the table can then be loaded to the buffer again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Using buffered tables improves the performance considerably.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bypassing the buffer increases the network considerably&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SELECT SINGLE * FROM T100 INTO T100_WA&lt;/P&gt;&lt;P&gt;  BYPASSING BUFFER&lt;/P&gt;&lt;P&gt;  WHERE     SPRSL = 'D'&lt;/P&gt;&lt;P&gt;        AND ARBGB = '00'&lt;/P&gt;&lt;P&gt;        AND MSGNR = '999'.&lt;/P&gt;&lt;P&gt;The above mentioned code can be more optimized by using the following code&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM T100  INTO T100_WA&lt;/P&gt;&lt;P&gt;  WHERE     SPRSL = 'D'&lt;/P&gt;&lt;P&gt;        AND ARBGB = '00'&lt;/P&gt;&lt;P&gt;        AND MSGNR = '999'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFULL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 05:55:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/buffering/m-p/2879287#M676149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T05:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: buffering</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/buffering/m-p/2879288#M676150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are the following types of buffering:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;single-record buffering&lt;/P&gt;&lt;P&gt;generic area buffering&lt;/P&gt;&lt;P&gt;full buffering&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Single-record buffering&lt;/P&gt;&lt;P&gt;With this kind of buffering, only the records of a table which are actually accessed are loaded into the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This kind of buffering requires less storage space in the buffer than full buffering. However, greater organization is necessary and considerably more database accesses are necessary for loading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an as yet unbuffered record is accessed with SELECT SINGLE, a database access occurs to load the record. If the table does not contain a record for the specified key ('no record found'), this record is noted as nonexistent in the buffer. If a further attempt is made to access this record, a renewed database access can be avoided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When should single-record buffering be selected?&lt;/P&gt;&lt;P&gt;For large tables where there are frequent single-record accesses (with SELECT SINGLE ...). The size of the records being accessed should be between 100-200 KB.&lt;/P&gt;&lt;P&gt;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, whilst single-record buffering calls for a very large number of table accesses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generic buffering&lt;/P&gt;&lt;P&gt;In a read access to a record of a generically buffered table, all the records whose left-justified part of the key (generic area) corresponds are loaded into the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this type of buffering is selected, the generic area must be defined by specifying a number n of key fields. The first n key fields of the table then define the generic key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of key fields to be entered must lie between 1 and the number of key fields -1. For example, only values between 1 and 5 are permitted for a table with 6 key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When should generic buffering be selected?&lt;/P&gt;&lt;P&gt;A table should be buffered generically if usually only certain areas of the table are required. The individual generic areas are treated like independent tables which are fully buffered. Please also read the text about full buffering.&lt;/P&gt;&lt;P&gt;The generic key area should be selected so that the generic areas are not too small to prevent too may generic areas being produced. If there are only a few records per generic area, it is more efficient to use full buffering.&lt;/P&gt;&lt;P&gt;Generic buffering only makes sense if the table is accessed by a specified generic key. If, when an access takes place, a field of the generic key is not supplied with a value, the buffer is ignored and the records are read directly from the database.&lt;/P&gt;&lt;P&gt;Language-specific tables are an example of a good use of generic buffering (with the language key field as generic key area).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Full buffering&lt;/P&gt;&lt;P&gt;With full buffering, either the complete table or none of the table is in the buffer. If a read access is made to a record, all records of the table are transferred to the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When should you select full buffering?&lt;/P&gt;&lt;P&gt;For tables up to 30 KB in size. If a table is accessed frequently, but all accesses are read accesses, this value can be exceeded.&lt;/P&gt;&lt;P&gt;For larger tables where large numbers of records are frequently accessed. However, if the application program is able to formulate an extremely selective WHERE condition using a database index, it may be advisable to dispense with full buffering.&lt;/P&gt;&lt;P&gt;For tables with frequent accesses to data not contained in the table. Since all records are contained in the buffer, a quick decision can be made as to whether or not the table contains a record for a specific key.&lt;/P&gt;&lt;P&gt;When considering whether a table should be fully buffered, you should take three aspects into account: the size of the table, the number of read accesses, and the number of write accesses. Tables best suited to full buffering are small, frequently read, and rarely updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SaiRam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 07:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/buffering/m-p/2879288#M676150</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2007-09-26T07:19:53Z</dc:date>
    </item>
  </channel>
</rss>

