‎2010 Jan 21 12:28 PM
Hi all,
I wonder about using internal table types. I always work with standard table type. I don't know when i have to use the standard, sorted or hashed itab type. Is there limits for line counts of types, like over 200.000 lines use hashed table type etc. ? I need performance improvements for itabs.
Thx,
‎2010 Jan 21 12:35 PM
‎2010 Jan 21 12:39 PM
‎2010 Jan 21 12:51 PM
‎2010 Jan 21 1:01 PM
Hi,
Adding to Adrain
If you are wondering what Binary Scan or Hashing is, I would recommend you to google RDBMS techniques 'Hashing' and Binary Search Algorithm.
This might give you an insight on how exactly these work.
‎2010 Jan 21 1:22 PM
over 50 lines you should not use standard tables !!!
‎2010 Jan 21 1:40 PM
Thanks Siegfried Boes and Nitwick
@ Siegfried Boes
Really i should not use standard tables over 50 lines ? I never heard this before.
And about internal tables when i define an internal table with the type of a database table ( e.g. MARA ), am i need to define keys to itab or it has already keys same with database table ( e.g. MARA ) ?
‎2010 Jan 21 2:46 PM
> Really i should not use standard tables over 50 lines ? I never heard this before.
I don't wonder, but my statement is still correct.
The special tables are tables with primary keys, which speed up you search. You need it when you access
the table several times and not only with LOOPs.
The table definition is completely independent of the database table.
Try to use sorted tables always. You rarely need hashed tables and avoid standard tables (even if you think they
will remain small).
Siegfried
‎2010 Jan 22 7:53 AM
Hallo,
We do use the internal table type standard for records more than lacks ....but you have too much of data and would like to improve the performance for the internal table. Please use the sorted internal table type or the indexed internal table type.
this would help you to improve the internal table performance.
BR,
Rajesh Gupta.
‎2010 Jan 26 7:44 AM
>
> . Please use the sorted internal table type or the indexed internal table type.
Your terminology is confusing. A standard table is an indexed internal table. Sorted is the other kind of indexed table. Indexed in this context means you can read from the table directly by row (index) number. READ my_itab INDEX 1.... for example.
‎2010 Jan 26 9:39 AM
the terminology of internal tables is unfortunately quite confusing:
internal tables use 'index' for the row number of the line in the table, if you know then you can access it directly. It is actually the sy-tabix variable which you have to know.
Things which are called index on the database are called keys, i.e. the sorted primary key of a SORTED table or the hashed primary key of a HASHED table (the technical realization is actually called index).
With the newest basis release (7.02 or 7.20) there are also secondary keys possible on internal tables, for all 3 types.
Siegfried