I'd like to save 3 letter codes to SQL database, and would like to use them later to execute many queries against that codes (probably 3-4 combinations of these codes to identify some a list of records).
I think if I use String representation for this could be slow as I will be having >100.000 entries.
I'm now thinking if I could just represent these 3 letter codes (english alphabet) with a unique digit, and just query for this digit?
Therefore I could transform each character to ascii and map A=01
, Z=26
(if I subtract 64 from the ascii value).
Thus AAA=010101
, ZZZ=262626
.
Would this make sense? Could I do better?