List:General Discussion« Previous MessageNext Message »
From:kabel Date:May 14 2009 2:03pm
Subject:Re: MAC address as primary key - BIGINT or CHAR(12)
View as plain text  
On Thursday 14 May 2009 09:53:58 am Fish Kungfu wrote:
> Since MAC addreses also contain letters, BIGINT wouldn't work.  So, yes, I
> would say go with CHAR(12).
>
> On May 14, 2009 9:43 AM, "Ilia KATZ" <ikatz@stripped> 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

And, if you use default charsets of anything else, make sure you set this 
column to CHARACTER SET ascii.  A smaller index is a happier index.

kabel
Thread
MAC address as primary key - BIGINT or CHAR(12)Ilia KATZ14 May
  • Re: MAC address as primary key - BIGINT or CHAR(12)Fish Kungfu14 May
    • Re: MAC address as primary key - BIGINT or CHAR(12)kabel14 May
    • RE: MAC address as primary key - BIGINT or CHAR(12)Ilia KATZ14 May
  • RE: MAC address as primary key - BIGINT or CHAR(12)Jerry Schwartz14 May
  • Re: MAC address as primary key - BIGINT or CHAR(12)Thomas Spahni14 May
  • Re: MAC address as primary key - BIGINT or CHAR(12)Jim Lyons14 May
  • RE: MAC address as primary key - BIGINT or CHAR(12)Daevid Vincent14 May
Re: MAC address as primary key - BIGINT or CHAR(12)Pete Wilson14 May
  • Re: MAC address as primary key - BIGINT or CHAR(12)Jim Lyons14 May
Re: MAC address as primary key - BIGINT or CHAR(12)Pete Wilson14 May
RE: MAC address as primary key - BIGINT or CHAR(12)Gavin Towey15 May
Re: MAC address as primary key - BIGINT or CHAR(12)Gavin Towey15 May