Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

And if I can, any reason (performance/stability) why I shouldn't?

share|improve this question
up vote 13 down vote accepted

Note that if your table is using the InnoDB Plugin storage engine (which I highly recommend), if it's a secondary index (almost surely the case), you can still read from the table (i.e. it's non-blocking to SELECT statements).

share|improve this answer
MySQL 5.6 update (feb 2013): you can now read and write to the table with online DDL -… – Morgan Tocker Dec 18 '13 at 4:55

Yes you can. It will lock the table you're adding an index to while it's being created. If the table is large, it may take awhile as it has to read each row while building the index.

share|improve this answer
Facebook has a solution for doing this online. Haven't tried it out myself:… – esilver Oct 13 '11 at 22:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.