Skip to content

Instantly share code, notes, and snippets.

@salekseev
Last active May 9, 2017 13:54
Show Gist options
  • Save salekseev/012e5cba3ae13bcbc7428e104b07f6cc to your computer and use it in GitHub Desktop.
Save salekseev/012e5cba3ae13bcbc7428e104b07f6cc to your computer and use it in GitHub Desktop.
problem: storing mac address (6 bytes) in rdbms efficiently
problem: storing mac address (6 bytes) in rdbms efficiently
options:
char(6) | long/bigint (8 bytes) | char(12)
byte array | decimal representation | hex characters in ascii
---------------------------------------------------------------------
efficiency: n | efficiency: n+2 | efficiency: n+6
terminal safe: n | terminal safe: y | terminal safe: y
human readable: ? | human readable: y | human readable: y
range find: custom | range find: builtin | range find: custom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment