2011 Jan 13 2:04 PM
Greetings,
I've been looking around but could not find a good answer regarding what kind of algorithms SAP uses for Sorting and searching.
My guess is that SAP uses quick sort or radix sorts perhaps for sorting and linear search/brute force for reads. Any input on this would be appreciated.
2011 Jan 13 2:36 PM
Hi,
are you talking about internal tables?
> My guess is that SAP uses quick sort or radix sorts perhaps for sorting
i learnt it is something "very similar to quick sort"
> and linear search/brute force for reads. Any input on this would be appreciated.
linear, binary or hash search alogrithms are used (depends e.g. on table type)
Kind regards,
Hermann
Greetings,
I've been looking around but could not find a good answer regarding what kind of algorithms SAP uses for Sorting and searching.
My guess is that SAP uses quick sort or radix sorts perhaps for sorting and linear search/brute force for reads. Any input on this would be appreciated.
2011 Jan 13 2:36 PM
Hi,
are you talking about internal tables?
> My guess is that SAP uses quick sort or radix sorts perhaps for sorting
i learnt it is something "very similar to quick sort"
> and linear search/brute force for reads. Any input on this would be appreciated.
linear, binary or hash search alogrithms are used (depends e.g. on table type)
Kind regards,
Hermann
2011 Jan 13 3:10 PM
Hi,
Indeed, I'm talking about internal tables.
If anyone can add more comments to confirm the algorithms used (specially for the sorting part) with a reliable source where the information came from, I'm good to go.
2011 Jan 13 3:15 PM
2011 Jan 13 3:37 PM
Hi, Search/Read part is already answered. Thanks.
To fully answer my concern, I require confirmation (with a source,such as an article, book citation, book, etc.) about the Sorting algorithm.
Edited by: Tree Sap on Jan 13, 2011 4:37 PM
2011 Jan 13 4:09 PM
> To fully answer my concern, I require confirmation (with a source,such as an article, book citation, book, etc.) about the Sorting algorithm.
are you interested in the algorithm (which i think is not published) or in the scalling behaviour (e.g. sort is n * log(n) like quick sort, binary search is log(n) linear search is n which is documented...)?
Kind regards,
Hermann
2011 Jan 13 4:35 PM
Hi.
Indeed, I'm interested in the "scalling behaviour (e.g. sort is n * log(n) like quick sort, " /Big O/BigOmega performance behavior.
I'm required to make a mathematical analysis of the sorting performance used by SAP vesus certain amount of reads. I don't need to know the source code for the algorithm that SAP uses, but instead, the name of the algorithm or it's relative computational complexity(Big O, (e.g. sort is n * log(n) like quick sort)
e.g. "On XSAP book page 23, it is sugested that SAP uses something similar to quick sort" or "wikipedia.org/SAP_performance mentions that SAP has a computational complexity for sort in the order of 2n * log(n) +k"......
2011 Jan 13 5:01 PM
Hi,
> Indeed, I'm interested in the "scalling behaviour (e.g. sort is n * log(n) like quick sort, " /Big O/BigOmega performance behavior.
you can find them in standard sap courses (BC490, BC402) and in blogs by Siegfried and in books (e.g. http://www.sap-press.com/products/ABAP-Performance-Tuning.html or http://www.dpunkt.de/buecher/3096/performance-optimierung-von-abap%26reg%3B-programmen.html)
> I'm required to make a mathematical analysis of the sorting performance used by SAP vesus certain amount of reads.
As a rule of thumb if i remember right i learnt one should have ~50 reads before a sort pays off. Maybe Siegfried cann tell you more here.
Kind regards,
Hermann
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |