Oracle 5.0 Reference Manual page 1306

Table of Contents

Advertisement

For big tables, this saves a lot of disk I/O because
secondary index records in a batch. Be certain that the data contains no duplicate keys.
• If you have
foreign key checks off for the duration of the import session:
SET
foreign_key_checks=0;... SQL import statements ...
SET foreign_key_checks=1;
For big tables, this can save a lot of disk I/O.
Other Tips
• Unlike MyISAM,
computes a cardinality for a table the first time it accesses it after startup. With a large number of
tables, this might take significant time. It is the initial table open operation that is important, so to
"warm up" a table for later use, access it immediately after startup by issuing a statement such as
SELECT 1 FROM tbl_name LIMIT
• Use the multiple-row
server if you need to insert many rows:
INSERT INTO yourtable VALUES (1,2), (5,5), ...;
This tip is valid for inserts into any table, not just
• If you often have recurring queries for tables that are not updated frequently, enable the query cache:
[mysqld]
query_cache_type = 1
query_cache_size = 10M
14.2.12.2.
SHOW ENGINE INNODB STATUS
Monitors provide information about the
InnoDB
performance tuning. Each Monitor can be enabled by creating a table with a special name, which
causes
InnoDB
available on demand through the
There are several types of
• The standard
• Table and record locks held by each active transaction
• Lock waits of a transactions
• Semaphore waits of threads
• Pending file I/O requests
• Buffer pool statistics
• Purge and insert buffer merge activity of the main
For a discussion of
To enable the standard
innodb_monitor. To obtain Monitor output on demand, use the
SQL statement to fetch the output to your client program. If you are using the
client, the output is more readable if you replace the usual semicolon statement terminator with \G:
mysql>
SHOW ENGINE INNODB STATUS\G
Performance Tuning and Troubleshooting
InnoDB
constraints in your tables, you can speed up table imports by turning the
FOREIGN KEY
does not store an index cardinality value in its tables. Instead,
InnoDB
syntax to reduce communication overhead between the client and the
INSERT
to write Monitor output periodically. Also, output for the standard
SHOW ENGINE INNODB STATUS
Monitors:
InnoDB
Monitor displays the following types of information:
InnoDB
lock modes, see
InnoDB
Monitor for periodic output, create a table named
InnoDB
can use its insert buffer to write
InnoDB
1.
tables.
InnoDB
and the
InnoDB
internal state. This information is useful for
InnoDB
thread
InnoDB
Section 14.2.7.1,
1286
Monitors
InnoDB
SQL statement.
"InnoDB
Lock
Modes".
SHOW ENGINE INNODB STATUS
mysql
InnoDB
Monitor is
interactive

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents