Application Development and Automation 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: 
Read only

How do reset the table buffer

0 Likes
11,872

The situation is as follows. After executing the SELECT request, I calculate the processing time. After the second time and further, the processing time is significantly less. Because the data is saved to the buffer. Q: How do I reset the table buffer? It is necessary that the requests after the first time are equal to the first time.

I tried tcode /$SYNC and /$TAB. No changes. It feels like we need to clear something else, or another transaction is needed. There must be something, anyway. Otherwise, if you run the query once a day, it will be equally long. Where is the dog buried???

Don't say it's impossible.

7 REPLIES 7
Read only

FredericGirod
Active Contributor
0 Likes
9,921

why didn't you manage the processing time after the first call ?

in real life you will have only one time the first call and several times the others

Read only

Patrick_vN
Active Contributor
9,921

Have you considered bypassing the buffer in your SQL statement instead?

  SELECT matnr mtart FROM mara INTO TABLE it_mara BYPASSING BUFFER.
Read only

joltdx
Active Contributor
9,921

Yes, this is the best way for you. But I really wonder WHY you would want this. Why do you want things to go slower? And resetting the buffer resets it for the entire system. The /$SYNC and /$TAB affect many things, so they shouldn't really be used unless really necessary... o_O

Also, this is bypassing the SAP buffer. Depending on the database system, there are most likely other buffers as well on the way from your code to the data. But I really doubt that clearing all of those is a good thing to do. And there's no access to that from within SAP anyway... 🙂

Read only

abo
Active Contributor
9,921

I find it amusing that the link in the English documentation uses the German spelling "puffer" 😉

Read only

0 Likes
9,921

The reason is clear. You need to clear the buffer at the database level. I tried to do it using native SQL. In the end, it was refused due to a lack of authority.

Read only

0 Likes
9,921

I hope you have a good reason, but it's not clear to me... I would strongly advice against clearing any buffers. Especially down in the database. It affects the entire database and SAP system negatively, not only your query!

Read only

joltdx
Active Contributor
0 Likes
9,921

Please do not clear the buffers.

If the equal processing time is really really important (for some reason I don't get), why don't you run your queries twice each time. The first time to equalize the buffers between runs, and the second time for measurements?