Frage

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 ∓ ∞

War es hilfreich?

Lösung

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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top