I have a standard table in ABAP, buffering is activated, type Single Records. Yet every SELECT
goes to the DB.
The table has fields [MANDT, A, B], but the SELECTs use only MANDT and A. Could this be the reason why the buffer is bypassed?
As the documentation for table buffering says, "Single Record" buffering only works when you provide the full primary key.
When this is a table which is under your control and there are no other applications which might prefer a different buffering strategy, then you can change its buffering type to "Generic Area" and enter the number of key fields you want to be part of the buffering key (2, in this case). When the table is very small, you might even consider to enable "Full Buffering", which will load the whole table into the application server's memory as soon as a single row is requested.
Alternatively, when all your accesses to the table happen within the same session, then you could consider to build your own in-memory buffering on the ABAP level. If you need your own buffering across sessions, you could build a buffer using a shared memory class. But this will of course become problematic when there are write-operations to the table which are beyond your control or write-operations on other application servers.