Question

Can someone explain which indexed search would be faster, listing from fastest, to slowest in a table with 1 million rows.?

index: hexadecimal

index: decimal

index: unicode chars ∓ ∞

Was it helpful?

Solution

Most of this is determined by the length of the key. This means:

Alphanumeric keys longer then 4 bytes (~ 4 characters) will perform less then an integer (= 4 bytes)

So, integer / decimal keys will perform pretty good. Unicode would be the poorest from your examples.

The difference between a hexaDECIMAL and a decimal is nothing: as long as it still fits in 4 bytes. If you exceed that, it will degrade in performance.

OTHER TIPS

I brlieve you will not find the performance difference in case of any of that types.

Because other factors (like disk IO speed) eat much more time, and it hides any differences in b-tree search with decimal vs string keys.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top