On Thu, 14 May 2009, Ilia KATZ wrote:

Hi.
Currently I have a table:
1. MAC address defined as BIGINT
2. MAC address set as primary key

Should I consider changing it to CHAR(12)?

Replies will be appreciated.
Ilia

Hi

It depends. You may convert the MAC address to a decimal integer and store it as a BIGINT. Use UNSIGNED as well; there are no negative numbers involved. This may gain some speed and saves storage space.

The drawback I can see is that these numbers are not human readable, but you may convert back to HEX when retrieving data.

And it may break when they start using larger MAC addresses eventually.

Thomas

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to