2015 Apr 03 4:26 PM
Hi All,
I have small confusion about internal table performance i.e. if we use sort operation on internal table before delete data form same table then it will increase performance or no effect in performance if don't use sort operation.
For example : In one table have 1000 records and i have to delete data by condition (eg. item name) which is at 900 index,
if we use sort operation before delete then it increase performance or not?
Thanks in Advance.
Shanti
2015 Apr 03 4:45 PM
Sorting is necessary only if you want to delete duplicate records from internal table.
2015 Apr 03 4:45 PM
Sorting is necessary only if you want to delete duplicate records from internal table.
2015 Apr 03 5:35 PM
Thanks pradeep for reply.
But my question is not for adjacent duplicates.
When we use delete ittab where f1 = 'f_value'. (characters)
If use sort before this operation then delete operation perform faster or not?
2015 Apr 03 6:00 PM
Not necessary, Based on type of internal table the system performs the search to delete the record.
Standard table uses Linear Search.
Sorted tables uses Binary search.
Hashed Tables will use Hashing Algorithm.
It is mandatory to sort while deleting duplicate records only.
Please go through the link below.
http://help.sap.com/saphelp_470/helpdata/en/06/aafd54fc4011d195280000e8353423/content.htm
Regards
Pradeep Kodinagula.
2015 Apr 03 6:17 PM