sortingabaphanainternal-tables# When sorting of itab is done in SQL query?

I have a select like this

```
DATA lt_data TYPE SORTED TABLE OF T_TYPE1 WITH NON-UNIQUE KEY col1.
SELECT col1, col2 INTO CORRESPONDING FIELDS OF TABLE lt_data where...
```

My question is: will the sorting operation be performed on the DB or on the application server side? My DB is Hana DB (S/4 Hana).

Solution

The documentation states that a sorting process is executed **after** the result set is inserted into the table thus it takes place on the application server.

The results set is inserted into the internal table itab row-by-row; a sorting process is executed in the case of a sorted table.

- Merge Sort Function not working when size of vector is not 2^n
- How to use toSorted() method in typescript
- How to sort only some rows of a table?
- How do I sort a dictionary by value?
- Minimize sum of products of adjacent elements of an array
- Merge Sorted Array in leetcode
- Method to find second highest number in an array in java
- Sort version-dotted number strings in Javascript?
- How to quickly form groups (quartiles, deciles, etc) by ordering column(s) in a data frame
- Atomically reorder huge list of documents in firestore
- How can I reverse a Java 8 stream and generate a decrementing IntStream of values?
- Sorting objects by coordinates from left to right from top to bottom
- Sorting HTML table with JavaScript
- Are there faster ways to quickly modify, update and sort lists or dictionaries?
- Efficient list sorting: Using heap instead of standard sorting is slower
- merge sort algorithm implemented in java giving ArrayIndexOutOfBound Exception
- Get permutation of one array based on the size ordering of the other array
- How to sort a list of strings numerically
- C# Sort List by Enum
- Does base64 encoding preserve alphabetical ordering?
- Sort and Count the array and create two property then display result on every first data
- How to sort a list of objects ascending by a property, then descending by another property in Java?
- Excel sort numbers with letter prefix
- How do I sort a list of objects based on an attribute of the objects?
- UNIX shell: sort a string by word length and by ASCII order ignoring case
- Custom Sort Using 4 Columns
- Python sorted function key
- Specific character count in string
- MongoDB Search and Sort, with Number of Matches and Exact Match
- dplyr arrange() function sort by missing values