Skip to Content

Performance questions...

(first of all, excuse my lack of english knowledge)

I'm pretty new to ABAP and in the course I did to get knowledge about it, I hear some things who left me dubious.

1) It's better work using SELECT * INTO TABLE itab many times as tables needed than using JOINS

2) If I need to get some records from a table, it will be faster to do SELECT INTO TABLE and then work over the internal table

Are these things really true? Without taking care about the server nor client capabilities? Things like these must be high memory leeching... which memory will I be using, server or client's? Of course, working like this will be faster, but only if my client doesn't will start to use disk cache.

Thanks in advance,

Vic

P.S.: Any link to any resource who explains how SAP and ABAP use the computer properties will be helpful to save me time and troubles in my nearly future as ABAP programmer.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 17, 2004 at 09:27 AM

    Hello Vicenc,

    its hard to answer your question in general. But maybe some info may help you also.

    1.) Join vs Select * into ITab

    SAP R/3 offers a own buffering concept for database tables. On buffered tables the Select into ITAB is normally faster, since the JOIN cannot access these in memory buffering.

    2.) Select vs Loop at ITab

    Working on internal tables is all the times faster the reading from SQL tables. But one should think about the memory requirements. If your ITAB may tend to clock infinite memory it might be a good idea, to keep only parts in memory.

    3.) Where is the memory needed

    The ITABs as any ABAP data item resides in the memory of the SAP r/3 application server

    Kind Regards

    Klaus

    Add comment
    10|10000 characters needed characters exceeded

    • Hi to all!

      I think, the following may put a point to the discussion. I found these while I was searching my notes.

      For SELECT .. ENDSELECT, and ARRAY FETCH, if the same number of data records must be transferred from the database server to the application server, since data records are transferred in 32 KB blocks, <b>the transfer load (that is, the number of fetches) is the same for both variants.</b>

      However, an ARRAY FETCH is <u>preferable</u> to a SELECT ... ENDSELECT loop, because data records are transferred per record from the database interface to the ABAP program in a SELECT .. ENDSELECT. In contrast, in an ARRAY FETCH, the data records are transferred to the ABAP program in a block.

      *--Serdar

  • Aug 18, 2004 at 06:15 AM

    Thanks all for your patience with a new guy in ABAP. I could contrast my teacher's words with the ABAP Objects book and your more detailed info.

    Not being an english native speaker/writer could make it hard to understand, having three forms of input has allowed me to contrast and better understand how ABAP works.

    Thanks again,

    Vicenç

    -

    -


    There are 10 kind of people, people who knows binary and people who doesn't.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 19, 2004 at 01:08 PM

    As I said a day to you... <b>forget</b> you the <b>joins</b> and <b>load</b> the records that you will need in <b>internal table</b>.

    Add comment
    10|10000 characters needed characters exceeded