On 9 May 2008, at 11:02 am, Christopher Jones wrote:
>
> Since `chr` is a set of defined values, at some point I
did have it
> as an ENUM. But then I read somewhere that this is bad,
so it got
> changed to VARCHAR. I always assumed that VARCHAR was
better than
> CHAR, and that the length didn't matter because it was
> variable....! So is ENUM bad? Would it be better/worse
than CHAR?
Int, enum, char in that order.
I'd avoid enum and just create a 'chr' table with an
identity/auto-
increment column as the pk, stick an index on it (if mySQL
hasn't set
one up on the pk) and join it to the histones table. No
problem with
adding new records to chr, or in the gotchas about dealing
with
enums. Then the multiple column index on histones will
(should
perform faster.
Iain
|