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
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 ik...@dane-elec.co.il 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
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 ik...@dane-elec.co.il wrote:
Hi.
Currently I have a table:
1. MAC address defined as BIGINT
2.
.
-Original Message-
From: Ilia KATZ [mailto:ik...@dane-elec.co.il]
Sent: Thursday, May 14, 2009 9:26 AM
To: mysql@lists.mysql.com
Subject: MAC address as primary key - BIGINT or CHAR(12)
Hi.
Currently I have a table:
1. MAC address defined as BIGINT
2. MAC address set as primary key
Should I consider
6th byte
the last 2 bytes (of the BIGINT) left unused.
Ilia
From: Fish Kungfu [mailto:fish.kun...@gmail.com]
Sent: Thursday, May 14, 2009 3:54 PM
To: Ilia KATZ
Cc: mysql@lists.mysql.com
Subject: Re: MAC address as primary key - BIGINT or CHAR(12
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
Definitely CHAR (or VARCHAR).
If the format of a MAC address changes at all, you could be in real
trouble. Also, if a MAC address can have a leading 0 (I don't know anything
about MAC addresses), then storing it as some sort of number could lose
that.
This is a general rule for me. A field
, from someone with experience.
-- Pete Wilson
http://www.pwilson.net/
--- On Thu, 5/14/09, Jim Lyons jlyons4...@gmail.com wrote:
From: Jim Lyons jlyons4...@gmail.com
Subject: Re: MAC address as primary key - BIGINT or CHAR(12)
To: Ilia KATZ ik...@dane-elec.co.il
Cc: mysql@lists.mysql.com
Wilson
http://www.pwilson.net/
--- On Thu, 5/14/09, Jim Lyons jlyons4...@gmail.com wrote:
From: Jim Lyons jlyons4...@gmail.com
Subject: Re: MAC address as primary key - BIGINT or CHAR(12)
To: Ilia KATZ ik...@dane-elec.co.il
Cc: mysql@lists.mysql.com
Date: Thursday, May 14, 2009, 11
I agree, and didn't mean to say that I disagreed. This is certainly one of the
top five principles to follow, imo. Too many times, while trouble-shooting,
I've run up on the rock of a binary (meaning: indecipherable) field.
What is the cost of including the binary representation (for indexing)
-
From: Ilia KATZ [mailto:ik...@dane-elec.co.il]
Sent: Thursday, May 14, 2009 6:26 AM
To: mysql@lists.mysql.com
Subject: MAC address as primary key - BIGINT or CHAR(12)
Hi.
Currently I have a table:
1. MAC address defined as BIGINT
2. MAC address set as primary key
Should I consider
To: Ilia KATZ ik...@dane-elec.co.il
From: Fish Kungfu fish.kun...@gmail.com
Cc: mysql@lists.mysql.com
Subject: Re: MAC address as primary key - BIGINT or CHAR(12)
Message-ID: f76e38f90905140653o4f6513aft103e8c3b526b3...@mail.gmail.com
--001636e90cddd7f9c70469dfa8fe
Content-Type: text/plain
I've run up on the rock of a binary (meaning: indecipherable) field.
SELECT hex(some_binary_field) FROM table;
Solved.
The information contained in this transmission may contain privileged and
confidential information. It is intended only for the use of
13 matches
Mail list logo