10-25-2013 3:34 PM
Hi,
I am a BW developer with some ABAP skills. One of my ABAP collegues mentined something about 'shared memory' and I understand that shared memory can be accessed across sessions and that it is stored in the application layer thereby making access times smaller.
I got a few questions though,
- Where is an internal table stored? I think it is also in the application layer. Am i right/wrong?
- Does a READ on an shared memory area have any advantage over READing an internal table?
I read a few documents and even tried a sample program, but I am not sure how to measure the difference between the two methods. SE30 looks different in my system and the help documents and I do not know what to read from all the numbers
Thanks,
Benedict
10-27-2013 8:42 PM
Hi Benedict,
Internal table is also stored in application layer and available only with in session and with that user only. But Shared Memory (Objects) is available across sessions, users and even application servers. So if you want same data or even some business logic across the users,sessions then you should use use Shared memory.
If you want use data in single session for single user then internal table give better performance,but want to use across sessions and users shared memory will gives gives better performance because we read data from data base and make available to other sessions and users.
To feel difference create program and note down time taken to select the data <select * from Dtab>. Let it is x. If we use 10 different user doing same so total time taken will be 10. But if we use shared memory ,read first user data from data base so it takes x, remaining 9 user read data from shared memory let find out time taken is y. Then compare 10x with x+9y .
For more details go through http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/307d791b-3343-2e10-f78a-e1d50c7cf...
Regards,
Sreenivas.
10-27-2013 8:42 PM
Hi Benedict,
Internal table is also stored in application layer and available only with in session and with that user only. But Shared Memory (Objects) is available across sessions, users and even application servers. So if you want same data or even some business logic across the users,sessions then you should use use Shared memory.
If you want use data in single session for single user then internal table give better performance,but want to use across sessions and users shared memory will gives gives better performance because we read data from data base and make available to other sessions and users.
To feel difference create program and note down time taken to select the data <select * from Dtab>. Let it is x. If we use 10 different user doing same so total time taken will be 10. But if we use shared memory ,read first user data from data base so it takes x, remaining 9 user read data from shared memory let find out time taken is y. Then compare 10x with x+9y .
For more details go through http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/307d791b-3343-2e10-f78a-e1d50c7cf...
Regards,
Sreenivas.