Oracle 5.0 Reference Manual page 1186

Table of Contents

Advertisement

13.7.2.5.
OPTIMIZE TABLE
OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE
tbl_name
OPTIMIZE TABLE
changes to a table with variable-length rows (tables that have VARCHAR, VARBINARY, BLOB, or
columns). Deleted rows are maintained in a linked list and subsequent
row positions. You can use
file. After extensive changes to a table, this statement may also improve performance of statements
that use the table, sometimes significantly.
This statement requires
OPTIMIZE TABLE
does not work for tables created using any other storage engine.
For
MyISAM
1. If the table has deleted or split rows, repair the table.
2. If the index pages are not sorted, sort them.
3. If the table's statistics are not up to date (and the repair could not be accomplished by sorting the
index), update them.
For
tables,
BDB
"ANALYZE TABLE
For
InnoDB
index statistics and free unused space in the clustered index.
You can make
option. In this case,
OPTIMIZE TABLE
Column
Table
Op
Msg_type
Msg_text
Note that MySQL locks the table during the time
By default, the server writes
replication slaves. To suppress logging, use the optional
LOCAL.
OPTIMIZE TABLE
#23578)
13.7.2.6.
REPAIR TABLE
Table Maintenance Statements
Important
If the checksums for two tables are different, then it is almost certain that the
tables are different in some way. However, because the hashing function used
by
CHECKSUM TABLE
chance that two tables which are not identical can produce the same checksum.
Syntax
[, tbl_name] ...
should be used if you have deleted a large part of a table or if you have made many
OPTIMIZE TABLE
[578]
SELECT
works only for MyISAM, InnoDB, and (as of MySQL 5.0.16)
tables,
OPTIMIZE TABLE
OPTIMIZE TABLE
Syntax".
tables,
OPTIMIZE TABLE
work on other storage engines by starting
OPTIMIZE TABLE
OPTIMIZE TABLE
returns a result set with the following columns.
Value
The table name
Always
optimize
status, error, info, note, or
An informational message
OPTIMIZE TABLE
does not sort R-tree indexes, such as spatial indexes on
Syntax
is not guaranteed to be collision-free, there is a slight
to reclaim the unused space and to defragment the data
and
[577]
privileges for the table.
INSERT
works as follows:
currently is mapped to
is mapped to
ALTER
is just mapped to
ALTER
warning
OPTIMIZE TABLE
statements to the binary log so that they replicate to
NO_WRITE_TO_BINLOG
1166
operations reuse old
INSERT
ARCHIVE
TABLE. See
ANALYZE
TABLE, which rebuilds the table to update
mysqld --skip-new
TABLE.
is running.
POINT
TEXT
tables. It
Section 13.7.2.1,
keyword or its alias
columns. (Bug

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents