Use with key & with Table key

Source: Internet
Author: User
Tags hash

Before I do the makes, I think it is necessary to understand key.     The inner table of ABAP and our real DB table are similar, there are linked fields bits in the structure, but the DB table on the handle key is much more random, can or may not, and if not explicitly stated in the table, all non-value linked fields bits of the linked fields bit in the table will be key, and you can also explicitly state key. The with-of this structure is primarily in the form of a table, including Delete,read. READ can be used with key or with table key, but delete can only be structured as follows with Table key language:
1.
Delete/read Itab-table_key
Syntax
... {with TABLE KEY {comp_name1| ( name1)} = dobj1
{comp_name2| (name2)} = Dobj2
...                           } ... .
2.
Read–table free Key
Syntax
READ TABLE itab {{with KEY dobj}
| {with KEY = Dobj [BINARY SEARCH]}} RESULT
So what we're really concerned about is the question of the efficiency of the inner table. The interview table can be used with key or with key-binary SEARCH or with table key, so how efficient are the various languages?     analysis of this problem, we have to understand how the tables are interviewed. Currently, there are index, binary Search (two-yuan method), linear, hash algorithm and so on. There is a direct relationship between the     and the type of the table, as follows: Standard table: Linear interview Sorted table : Binary Search Hashed table:hash algorithm says So much, the point of this article is to talk about, when we use standard table, if you use the Access table, the efficiency of using with key or with table key will be worse than with key---Binary Search, because the previous two are linear, W ITH table Key Many people will understand the index access to the DB, then it is necessary to make a little change in understanding the internal table. If you use sorted table to use binary search, you can also add binary search to the language, but the addition is the same effect.     Finally, there were some questions that didn't find the reason:      1. With table key for what not to use binary search      2. Whether the region with table key and with key is the first requirement of the former

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.