June 20, 2013

Post: Hacking to make ALTER TABLE online for certain changes

… 1 Unfortunately, adding auto_increment does not work that way. Enum values (add and remove). Enumerated values are added and removed…. Table comment. I’m pretty sure that would work for changing table comment as well, however – changing a comment with a help of ALTER TABLE does not rebuild the table, so we better…

Post: Using MMM to ALTER huge tables

table modifications online. It works well when all you want is to remove auto_increment or change ENUM values. When it comes to changes that really require table to be rebuilt – adding/dropping columns or indexes, changing data type… assigned to db1 at this stage. If you’re altering gigabyte size tables, this step may take some time. Go get a…

Post: Picking datatype for STATUS fields

… a good idea, though using ENUM is also fine choice as you’re not planning to change allowed values for such field… is rather efficient. The problem with ENUM is adding new values using traditional way (ALTER TABLE) causes table rebuild which is not acceptable for… numbers in the application directly. I prefer to have the table though because correctly architecting your queries you can use such…

Comment: Hacking to make ALTER TABLE online for certain changes

It would be nice if other ALTER TABLE commands which didn’t strictly need a rebuild didn’t …_KEY_WRITE should not require a table rebuild. Likewise, a change of an ENUM column to add more ENUM values shouldn’t require one… to hack the change by doing the ALTER to a similar, empty table, then copying the .frm file (this requires the table to be…

Post: PROCEDURE ANALYSE

…length: 8.7482 Std: NULL Optimal_fieldtype: ENUM(‘blog’,'contact’,'customer’,'image’,'lab_project’,'…though when types never change and savings could be significant the change may make sense. Another…tool suggested data types to do an ALTER TABLE it provides very helpful information for performing …

Comment: Enum Fields VS Varchar VS Int + Joined table: What is Faster?

… you need to change number of values in ENUM it is nightmare. Sometimes you can hack around by avoiding costly ALTER TABLE (just replacing…