Skip to Content
0
Oct 19, 2012 at 10:11 AM

Clarifications on Table Buffer Trace of ST05

625 Views

Hello Experts,

I am not very clear with regards to the "Table Buffer Trace" of ST05. Firstly, I considered the following cases:

Case 1:

DO 3 TIMES.

SELECT *

FROM DARTT ""DARTT is a fully buffered table with 514 records

INTO TABLE IT_DARTT.

ENDDO.

And the following was the Buffer Trace:


Figure 1: Buffer Trace for SELECT..INTO TABLE

Then, I executed the following code:

Case 2:

DO 3 TIMES.

SELECT *

FROM DARTT

INTO WA_DARTT.

ENDSELECT.

ENDDO.

And the following was the buffer trace:

Figure 2: Buffer Trace for SELECT/ENDSELECT

Next, I executed the following code:

Case 3:

DO 3 TIMES.

SELECT *

FROM DARTT

INTO TABLE IT_DARTT

PACKAGE SIZE 50.

ENDSELECT.

ENDDO.

The following was the buffer trace:


Figure 3: Buffer Trace for SELECT..INTO TABLE..PACKAGE SIZE/ENDSELECT.

The following are my questions:

(1) In each of the three cases, can I conclude safely that the Table Buffer is being accessed three times? (this is expected since all my select queries are inside a DO 3 TIMES/ENDDO.

(2) If you see Figure 1 (the buffer trace corresponding to Case 1), the value under "Recs" column for every FETCH operation is zero (i.e. the number of records fetched from the buffer in every FETCH operation is zero). Why is it zero? (the table DARTT is NOT empty).

On the other hand, in Figure 2 (the buffer trace corresponding to Case 2), the value under "Recs" column, for FETCH operation is 514 (which means all 514 records of the table are fetched from the buffer).

(3) In Figure 3 (the buffer trace corresponding to Case 3), the value under "Recs" column for FETCH operation is 10. I guess this is because, I have specified package size as 10. Does that mean only 10 records are fetched from the buffer? Then what about the (514-10 = 504 records)? Aren't the other 504 records fetched from the buffer?

I request you to please correct me if I am going wrong in my understanding somewhere.

I am playing around with the buffer trace because I want to know if the table buffer is availed when a SELECT...PACKAGE SIZE../ENDSELECT statement is used on a buffered table.

Thanks for your time and effort.