ABAP 優化文件【來自網路】加個人體會 - 2
Modifying a group of lines of an internal table:如果內表中需要對多行進行資料修改,請採用整體修改的方式
Use the variations of the modify command to speed up this kind of processing.
Not recommended
Loop at int_fligh.
If int_fligh-flag is initial.
Int_fligh-flag = ‘X’.
Endif.
Modify int_fligh.
Endloop.
Recommended
Int_fligh-flag = ‘X’.
Modify int_fligh transporting flag where flag is initial.
個人體會:注意這個transporting
When a programmer uses the read command, the table is sequentially searched. This slows down the processing. Instead of this, use the binary search addition. The binary search algorithm helps faster search of a value in an internal table. It is advisable to sort the internal table before doing a binary search. Binary search repeatedly divides the search interval in half. If the value to be searched is less than the item in the middle of the interval, the search is narrowed to the lower half, otherwise the search is narrowed to the upper half.
Not Recommended
Read table int_fligh with key airln = ‘LF’.
Recommended
Read table int_fligh with key airln = ‘LF’ binary search.
個人體會:記得先排序
Appending 2 internal tables:連結兩個內表
Instead of using the normal loop-endloop approach for this kind of programming, use the variation of the append command. Care should be taken that the definition of both the internal tables should be identical.
Not Recommended
Loop at int_fligh1.
Append int_fligh1 to int_fligh2.
Endloop.
Recommended
Append lines of int_fligh1 to int_fligh2.
個人體會:比較少用,記住使用者即可
Use of buffered tables is recommended to improve the performance considerably. The buffer is bypassed while using the following statements
- Select distinct
- Select … for update
- Order by, group by, having clause
- Joins
Use the Bypass buffer addition to the select clause in order to explicitly bypass the buffer while selecting the data.
Use of FOR ALL Entries:where條件採用內表的方式才說明
Outer join can be created using this addition to the where clause in a select statement. It speeds up the performance tremendously, but the cons of using this variation are listed below
- Duplicates are automatically removed from the resulting data set. Hence care should be taken that the unique key of the detail line items should be given in the select statement.
- If the table on which the For All Entries IN clause is based is empty, all rows are selected into the destination table. Hence it is advisable to check before-hand that the first table is not empty.
- If the table on which the For All Entries IN clause is based is very large, the performance will go down instead of improving. Hence attempt should be made to keep the table size to a moderate level.
Not Recommended
Loop at int_cntry.
Select single * from zfligh into int_fligh
where cntry = int_cntry-cntry.
Append int_fligh.
Endloop.
Recommended
Select * from zfligh appending table int_fligh
For all entries in int_cntry
Where cntry = int_cntry-cntry.
個人體會:要注意內表為空的情況
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/554557/viewspace-470536/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ABAP 優化文件【來自網路】加個人體會 - 3優化
- ABAP 優化文件【來自網路】加個人體會 - 1優化
- Oracle 優化詳解——來自網路Oracle優化
- 個人部落格 SEO 優化(2):站內優化優化
- 通過自動化和現代化實現網路優化優化
- iOS 網路優化iOS優化
- 網路優化設定的具體步驟優化
- Python 3.8 新功能-來自社群翻譯貼-個人改進程式碼優化版Python優化
- SAP ABAP 效能優化實踐優化
- 網路管理自動化
- 致謝參加虛擬化技術網路大會的朋友們薦
- 運籌優化(八)--圖與網路優化優化
- 九、Android效能優化之網路優化Android優化
- Android 效能優化(八)之網路優化Android優化
- oracle 10gR2 rman備份優化加強Oracle 10g優化
- ABAP文件生成工具
- 深度優化 iOS 網路模組優化iOS
- 網路效能優化常用方法優化
- iOS效能優化 - 網路圖片載入優化iOS優化
- J2EE系統優化的幾點體會(一、物件)優化物件
- 吳恩達《優化深度神經網路》課程筆記(2)– 優化演算法吳恩達優化神經網路筆記演算法
- 谷歌重返中國,會給中國網際網路帶來怎樣的變化谷歌
- 效能優化技巧知識梳理(2) 記憶體優化優化記憶體
- 2014第八屆移動網際網路國際研討會請你來參加
- 網際網路有機會“慢”下來麼?
- 2.記憶體優化(二)優化分析記憶體優化
- 漫漫優化路,總會錯幾步(記一次介面優化)優化
- 如何優化深度神經網路?優化神經網路
- 網路效能優化及安全保障優化
- 5個小眾化的自媒體網站,速速收藏起來網站
- 自智網路:網路自身的數字化轉型
- 百度App網路深度優化系列《一》DNS優化APP優化DNS
- 網路安全法獲高票通過 明確加強個人資訊保護
- 網路安全法獲高票透過 明確加強個人資訊保護
- 利用進化方法自動生成神經網路:深度進化網路DENSER神經網路
- Unity記憶體最佳化(來自uwa)Unity記憶體
- “網際網路+廣交會”,AMT助廣交會確立網際網路時代競爭新優勢
- TensorFlow神經網路優化策略神經網路優化