The MySQL manual for 6.0 at
http://dev.mysql.com/doc/refman/6.0/en/alter-table.html says that the
following are online operations:


   -

   Alterations that modify only table metadata and not table data can be
   made immediately by altering the table's .frm file and not touching table
   contents. The following changes are fast alterations that can be made this
   way:
   -

      Renaming a column or index.
      -

      Changing the default value of a column.
      -

      Changing the definition of an
ENUM<http://dev.mysql.com/doc/refman/6.0/en/enum.html>or
      SET <http://dev.mysql.com/doc/refman/6.0/en/set.html> column by adding
      new enumeration or set members to the *end* of the list of valid
      member values.

   In some cases, an operation such as changing a VARCHAR(10) column to
   VARCHAR(15) may be immediate, but this depends on the storage engine for
   the table. A change such as VARCHAR(10) to a length greater than 255 is
   not immediate because data values must be modified from using one byte to
   store the length to using two bytes.

It also lists renaming as a fast operation.

During a recent MySQL User Group meeting where we were discussing the online
ALTER TABLE options (new in 5.1), the following question came up:

Why isn't dropping an index/primary key/unique key/foreign key an online
operation?  Or rather, why is it slow?  It should be easy to drop an index,
there's no updating needed other than "don't use the index object any more".

(the answer may very well be "it is a very fast operation")...at any rate,
this should be changed in Drizzle if it isn't already...


-- 
- Sheeri K. Cabral

Note:  Currently I work for The Pythian Group (http://www.pythian.com/ ), a
remote DBA firm, and consulting would constitute a conflict of
interest.  However, I do recommend our work, and if you're looking for DBA
work (I do MySQL work, but they have great Oracle and SQL Server DBAs too)
right now, whether you need a few hours a week, or someone fulltime while
you continue a job search.

I have a webpage with tips on how to find a DBA:
http://sheeri.net/how-to-find-a-dba/
I can recommend http://www.toomanyconnections.com as a good site to find
MySQL (and Oracle) DBAs.
If you're looking for web design, I recommend the small business my husband
works for, http://www.digital-loom.com
I regret that I have no other information for any other type of position,
including developer, programmer and systems administrator.
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to