Barry wrote:
Jörgen Winqvist schrieb:
Hi,
I need to add another value in an enum so "ALTER TABLE table1 MODIFY
Status ENUM('a','b','c')" where 'c' is the new value. My problem is
that the tables are VERY big and it would take days to alter them all.
Tried it?
I also use big tables but adding a field takes a few seconds.
Well it does take long if there is a key on the field.
That would rise the querytime.
Yes I have tried it and it takes hours on a table 4 Gb data and 4 Gb
index with apx 50 milj rows and i have 15 of them. The enum field is not
in any indexes.
So, i figure the values in enum:s are in the .frm file so why not
change it and leave the rest. I created a new empty table and altered
it and then copied the new .frm file over the old one.
... and it does seem to work! Select, update works fine and I can use
the new value.
My question is if its OK? Has it been done before? Do I miss anything
here?
Probably the indizes might not work properly anymore.
But i am not so much into MySQL that i could tell you how MySQL works
behind ALTER TABLE.
Barry
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]