Is there a performance improvement or best practice when it comes to using unique numeric identifier fields in a database table compared to using characters?
For example, if I had two tables:
athlete
id ... 17, name ... Ricky Henderson, teamid ... 28
Command
teamid ... 28, team name ... Auckland
A table of athletes with thousands of players will be easier to read if teamid was, say, βOAKβ or βSDβ instead of β28β or β31β. Let them believe that teamid values ββwill remain unique and consistent in the form of characters.
I know you can use characters, but this is a bad idea for indexing, filtering, etc. for any reason?
Please ignore the normalization argument, as these tables are more complex than the example.
source share