The classic performance guidelines for using Open SQL and for ABAP Programming essentially remains valid.
These guidelines can be called the five golden rules which are as follows:
This reduces both the amount of memory used in the database system and the network load when transferring data to the application server. To reduce the size of your result sets, use the WHERE and HAVING clause.
To only transfer the columns you really need, use SELECT with a field list, instead of SELECT *.
On all database systems, there is a small performance overhead associated with every request for connection handling, SQL parsing, execution plan determination, and so on. Use JOINs and/or sub-queries instead of nested SELECT loops.
Do not retrieve unnecessary data from the database by selecting any of the following:
Minimize the size of the result set by using WHERE and HAVING clauses. To increase the efficiency of these clauses, formulate them to fit with the database table indexes.
Unlike application servers and presentation servers, there is only one database server in your system. Use the following methods: avoid reading data redundantly, use table buffering(if applicable) and do not bypass it, and sort data in your ABAP programs.
Some guidelines become even more important with SAP HANA.