Search the MySQL manual:
MySQL Manual

Buy this Reference Manual in softcover from Barnes & Noble!

/ / Up / Table of Contents

5.2.9 Скорость выполнения запросов INSERT

Время, необходимое для вставки записи, можно грубо разделить на такие промежутки:

где числа в скобках пропорциональны полному времени. При этом не учитывается время в начале вставки, требующееся для открытия таблиц (таблицы открываются один раз для каждого конкурентно выполняющегося запроса).

Размер таблицы замедляет вставку индексов в log N раз (B-деревья).

Некоторые способы ускорения вставки:

Чтобы дополнительно повысить скорость выполнения команд LOAD DATA INFILE и INSERT, увеличьте буфер ключа (key buffer). See section 5.5.2 Настройка параметров сервера.

User Comments

Posted by f f on Wednesday January 29 2003, @9:14pm [Delete] [Edit]

You can't imagine how frustrating it is to be told that I can create an insert statement with a "multiple values list" (5.2.9 Speed of INSERT Queries)and not be able to find an example of the syntax on this site (or any other that I know of, for that matter!).

Posted by Jason M on Wednesday February 5 2003, @7:24pm [Delete] [Edit]

There is a multi value example above. This one contains 3 rows to be inserterd.

mysql> INSERT INTO a VALUES (1,23),(2,34),(4,33);

Add your own comment.

Top / / / Up / Table of Contents