Oracle 5.0 Reference Manual page 1319

Table of Contents

Advertisement

MySQL uses index cardinality estimates only in join optimization. If some join is not optimized in
the right way, you can try using
not produce values good enough for your particular tables, you can use
queries to force the use of a particular index, or set the
to ensure that MySQL prefers index lookups over table scans. See
Variables", and
Section C.5.6, "Optimizer-Related
SHOW TABLE STATUS
size reserved by the table. The row count is only a rough estimate used in SQL optimization.
does not keep an internal count of rows in a table because concurrent transactions might
InnoDB
"see" different numbers of rows at the same time. To process a
statement,
must scan an index of the table, which takes some time if the index is not
InnoDB
entirely in the buffer pool. If your table does not change often, using the MySQL query cache is a
good solution. To get a fast count, you have to use a counter table you create yourself and let your
application update it according to the inserts and deletes it does. If an approximate row count is
sufficient,
SHOW TABLE STATUS
Tips".
• On Windows,
InnoDB
databases in a binary format from Unix to Windows or from Windows to Unix, create all databases
and tables using lowercase names.
• An
AUTO_INCREMENT
to perform the equivalent of an indexed
maximum column value. Typically, this is achieved by making the column the first column of some
table index.
• In MySQL 5.0 before MySQL 5.0.3,
setting the initial sequence value in a
with InnoDB, insert a dummy row with a value one less and delete that dummy row, or insert the first
row with an explicit value specified.
• While initializing a previously specified
exclusive lock on the end of the index associated with the
accessing the auto-increment counter,
the lock lasts only to the end of the current SQL statement, not to the end of the entire transaction.
Other clients cannot insert into the table while the
"AUTO_INCREMENT
• When you restart the MySQL server,
column but never stored (that is, a value that was generated during an old
AUTO_INCREMENT
transaction that was rolled back).
• When an
AUTO_INCREMENT
-9223372036854775808
if you were to insert one million rows per second, it would still take nearly three hundred thousand
years before
BIGINT
error results. This is general MySQL behavior, similar to how
DELETE FROM tbl_name
• Under some conditions,
and does not reset the
tbl_name
Syntax".
TABLE
• The
LOAD TABLE FROM MASTER
for
tables. A workaround is to alter the table to
InnoDB
and after that alter the master table back to InnoDB. Do not do this if the tables use InnoDB-specific
features such as foreign keys.
Limits on
InnoDB
TABLE. In the few cases that
ANALYZE
does not give accurate statistics on
can be used. See
always stores database and table names internally in lowercase. To move
column
must be defined as part of an index such that it is possible
ai_col
SELECT MAX(ai_col)
InnoDB
CREATE TABLE
AUTO_INCREMENT
InnoDB
Handling in
InnoDB".
InnoDB
column runs out of values,
and
BIGINT UNSIGNED
reached its upper bound. With all other integer type columns, a duplicate-key
does not regenerate the table but instead deletes all rows, one by one.
TRUNCATE tbl_name
AUTO_INCREMENT
statement for setting up replication slave servers does not work
1299
Tables
max_seeks_for_key
Issues".
InnoDB
SELECT COUNT(*) FROM t
Section 14.2.12.1,
lookup on the table to obtain the
does not support the
AUTO_INCREMENT
or
ALTER TABLE
column on a table,
AUTO_INCREMENT
uses a specific
AUTO-INC
table lock is held. See
AUTO-INC
may reuse an old value that was generated for an
wraps a
InnoDB
to 1. However,
MyISAM
for an
table is mapped to
InnoDB
counter. See
on the master, then do the load,
MyISAM
ANALYZE TABLE
with your
FORCE INDEX
[471]
system variable
Section 5.1.4, "Server System
tables, except for the physical
"InnoDB
Performance Tuning
table option for
statement. To set the value
sets an
InnoDB
column. While
table lock mode where
Section 14.2.3.3,
to
BIGINT
values have 64 bits, so
BIGINT
works.
DELETE FROM
Section 13.1.21,
"TRUNCATE
does

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents