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. It's 100% free, no registration required.

1 Answer
1

No, it does not export indexes. Indexes are rebuilt upon loading the mysqldump back into mysql. The options you found "--disable-keys" cause the the mysqldump to write something like this before the table's load via INSERTs:

DISABLE KEYS and ENABLE KEYS were
implemented to disable the reloading
of nonunique indexes while a table is
being reloaded. Primary Keys and
Unique Keys are not disabled. They are
loaded at the same moment the INSERTs
are being. Once you ENABLE KEYS, the
nonunique indexes are rebuilt via
sorting (or using the MyISAM key cache is there isn't
enough available memory)

Unfortunately, DISABLE KEYS and ENABLE
KEYS only work for MyISAM tables, not
InnoDB.

CAVEAT #2

You do not have to --disable-keys. You could disable DISABLE KEYS (no pun intended) them with --skip-disable-keys: