Posts

Showing posts with the label Performance Optimization

Optimizing ABAP Performance: Best Practices and Parallel Cursors

Image
 We have discussed the Message class and how to create a transaction code for a Executable program in our last blog. Let’s discuss some best programming practices. Best Performance Practices/Guidelines :- Never use * in the query. Fetch the data of only those columns which are required. Columns fetching sequence needs to be same as that of data dictionary column sequence. Where condition column sequence needs to be same as that of data dictionary column sequence. Never use corresponding in the query. For traditional databases avoid using JOIN, use FOR ALL ENTRIES IN. For fetching data from foreign key tables/dependent tables, Check for sy-subrc or internal table not initial condition. Use binary search in read table. Use parallel cursor in nested loops. For multiple conditions, use case conditional statement rather than if conditional statement. Depends upon the requirement, create secondary indexes to improve the performance. Never write a select query inside the lo...

Revolutionizing Data Management: A Deep Dive into Hashed Internal Tables and Beyond

Image
 Welcome back everyone, I hope you all will be fine. So basically in our last blog we were discussing about types of internal table. So let’s continue it. Hashed Internal Tables :- They are the special type of internal table which works on HASH algorithms. We need to specify the unique key while declaring the internal table. Hashing :- It is a technique which directly returns the address of the record based upon the search key without using the index. Suppose we have 5 order numbers and we have specified order number 10 as unique key, So in this case Hashing will directly map or point to the address of the order number 10. They are not the index based internal table. Records can be inserted. Data already sorted, there is no need to use SORT statement. Key operation is used to search a record, there is no index search. Hashed algorithm is used to search a record. Response time is faster as compared to Standard and sorted internal tables, as response ti...