Five Important rules to improve the performance of Database access

  1. Output results must be minimum. Please try to use where, having constraints in the query to reduce the data records read from the Database table.
  2. Use SELECT colum1, column2 instead of SELECT *From. The performance will be better as only the important columns are selected in the query.
  3. Use Joins instead of writing multiple select statements. The performance will be better as each select statement is going to be costly.
  4. Try to use Indexes, primary keys in the SELECT query to read data records from the Database table.
  5. Try to use Buffer concept in Database access. So read the records only once and store it in buffer variable. Try to sort the data in the ABAP program instead of using ORDER BY in the SQL query.