Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

sort table vs hashed table

Can somebody tell me when I should use sort table and when hashed table?

Edited by: Comandante Che Guevara on Oct 14, 2008 12:23 PM

Tags:
replied

Hi

It depends on your needs.

Hashed table access is by key, search time is independent of register number. You can use it when you have large amount of register, and you want to retrieve data very quickly.

In sorted table, if you access by the sorted key, you can specify BINARY SEARCH. Search time depends on register number, but not so much, since is logarithmic. If you access by another key (not sorted key), search is sequential and depends much on amount of data.

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question