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: 

database buffer used?

rohit_trivedi
Participant
0 Kudos

Hi,

I've a customizing table which is single record buffered.

Data is selected on it inside a loop.

The selects are on same records each time.

I know this will use the buffer.

But is there a way i can determine if last execution of select statement used database buffer or selected directly from database.

Regards,

Rohit.

6 REPLIES 6

andrea_galluccio2
Contributor
0 Kudos

Hi,

if statistics are maintained, try with ST10 trx.

Input "type of table" and the date (for example today) and u'll see if the table is accessed by programs.

I don't know if there are other methods but this is the one i know near your requirements.

Hope it helps

Bye

Andrea

Pls reward if it helps

Former Member
0 Kudos

hi

good

go through this links which ll give you complete idea about the database buffer.

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

thanks

mrutyun^

Former Member
0 Kudos

hi,

I dont think there is a provision to know whether the data that is fetched is obtained by bypassing buffer or not.

But by bypassing buffer addtion, we can explicitly specify whether we want to bypass buffer or not.

	select  matnr bypassing buffer from mara
		into table i_mara
		where matnr in s_matnr.

Table buffering is used to optimize data access from database. However if buffering is used on tables which are updated frequently, it has an adverse effect. The buffer area is updated at regular intervals by the system. If selection is done from this table before the buffer is updated the values are fetched first from the buffer and then from the database as the buffer is outdated. This increases the load on the system and also the processing time.

<b>It is always a good practice to bypass buffer in the select statement for tables, which are buffered but are updated at regular frequently.

</b>

Regards,

Sailaja.

rohit_trivedi
Participant
0 Kudos

Hi All,

The buffer is not being bypassed explicitly.

The select statment is most trivial one and should use buffer.

Although, trnx ST10, shows buffer state as 'Absent'.

I dont know why!

The table is very small, 10 records in total with 5 columns.

The selects are identical which select same 3 records each time.

The table as i already said in my first reply is a single record buffered.

Now, i've two questions again:

1. How can i determine if a select statement has read data from buffer or database.

2. Why is the table buffer shown 'Absent' in ST10.

Thanks again for all your help!

Regards

Rohit.

Former Member
0 Kudos

Hi Rohit,

Have you got an answer for your question? I too am lost in a similar situation. I have buffered custom tables(small in size and static), but for some reason one of the tables shows its buffer state as ABSENT. I have used single records buffering. I have accesssed the tables using SE16, but for some reason the buffer state does not show as VALID.

Thanks,

Regards,

Nischal

0 Kudos

I think the question should be rephrased as "is the table buffer used?", since database buffer is where the DBMS caches data. According to the SAP Performance Optimization Guide (<i>Schneider 4th ed.</i>), "Absent" means that the table is not in the buffer (because for example it was never loaded or it has been displaced).

I would look in the SQL cache to see what statements are being executed against the table in question. For fully buffered tables, you should see full table scans (e.g. SELECT * WHERE MANDT = :A0) -- hopefully just a few times; for generic or single record buffered tables you should see SELECT statements with WHERE clauses matching the primary key or parts thereof.

I would also look at buffer sizes, as displacements indicate the buffer is too small, or that other large objects are pushing small ones out.

Jim