For DDL operations on tables and indexes
DROP statements), the most significant
InnoDB tables is that creating
and dropping secondary indexes is much faster in MySQL 5.5
and higher, than in MySQL 5.1 and before. See
Section 14.3.14, “
InnoDB Fast Index Creation” for details.
“Fast index creation” makes it faster in some cases to drop an index before loading data into a table, then re-create the index after loading the data.
TRUNCATE TABLE to empty a
. Foreign key
constraints can make a
work like a regular
DELETE statement, in
which case a sequence of commands like
DROP TABLE and
CREATE TABLE might be
Because the primary key is integral to the storage layout of
InnoDB table, and changing the
definition of the primary key involves reorganizing the
whole table, always set up the primary key as part of the
CREATE TABLE statement, and
plan ahead so that you do not need to
primary key afterward.
Copyright © 1997, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices