Abap Performance Guideline

1. Architecture

传统db的瓶颈在于从磁盘读写数据的性能有限。而Hana则将数据直接放置在内存中,只将logging和backup的数据存放在磁盘中,不受I/O的限制。

Sap Neatwear Abap 通过DBI (database independent layer) 访问database. DBI 中集成了open SQL 和native SQL, 默认会使用open SQL,特殊情况会使用native SQL. 基于这样的架构,在底层使用HANA DB 的时候,经典的abap performance guideline也适用于hana db的情况。

2.classical five rules

make where clause as specific as possible

use select with field list instead of select *

use aggregate functions like (count,min,max,sum,avg)

use join or sub queries instead of nested select loops

use select for all entries

use array variants of insert,update,modify,delete

define and use secondary indexes

avoid reading data redundantly

use table buffering

sort data in abap program

3.more important for sap hana

for modifying operations using array operations should be perferred to single operations

nested select loops should be avoided or replaced if possible eg.

using for all entries

using abap table buffer

你可能感兴趣的:(Abap Performance Guideline)