Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sorting is required before delete data from internal table?

Former Member
0 Likes
2,922

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

1 ACCEPTED SOLUTION
Read only

prad_k
Explorer
0 Likes
1,652

Sorting is necessary only if you want to delete duplicate records from internal table.

4 REPLIES 4
Read only

prad_k
Explorer
0 Likes
1,653

Sorting is necessary only if you want to delete duplicate records from internal table.

Read only

Former Member
0 Likes
1,652

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?

Read only

0 Likes
1,652

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.

Read only

Former Member
0 Likes
1,652

Thanks for Helpful Answer.