@king555

Percona(MySql) почему долго создаются таблицы?

Server version: 5.6.19-67.0-log Percona Server (GPL), Release 67.0, Revision 618
Очень долго отрабатывает создание таблиц INNODB(myIsam в разы быстрее)

show profiles;
+----------+------------+------------------------------------------------------------+
| Query_ID | Duration | Query |
+----------+------------+------------------------------------------------------------+
| 1 | 7.01070900 | CREATE TABLE b_1 (id BIGINT UNSIGNED NOT NULL PRIMARY KEY) |
| 2 | 8.74282450 | CREATE TABLE b_2 (id BIGINT UNSIGNED NOT NULL PRIMARY KEY) |
| 3 | 9.66998975 | CREATE TABLE b_3 (id BIGINT UNSIGNED NOT NULL PRIMARY KEY) |
| 4 | 9.98623825 | CREATE TABLE b_4 (id BIGINT UNSIGNED NOT NULL PRIMARY KEY) |
| 5 | 8.30592200 | CREATE TABLE b_5 (id BIGINT UNSIGNED NOT NULL PRIMARY KEY) |
+----------+------------+------------------------------------------------------------+
5 rows in set, 1 warning (0.00 sec)

mysql> show profile for query 3;
+----------------------+----------+
| Status | Duration |
+----------------------+----------+
| starting | 0.000029 |
| checking permissions | 0.000004 |
| Opening tables | 0.000053 |
| creating table | 9.669869 |
| After create | 0.000006 |
| query end | 0.000002 |
| closing tables | 0.000005 |
| freeing items | 0.000015 |
| cleaning up | 0.000008 |
+----------------------+----------+
9 rows in set, 1 warning (0.00 sec)

mysql> show profile for query 2;
+----------------------+----------+
| Status | Duration |
+----------------------+----------+
| starting | 0.000031 |
| checking permissions | 0.000006 |
| Opening tables | 0.000061 |
| creating table | 8.742693 |
| After create | 0.000006 |
| query end | 0.000003 |
| closing tables | 0.000006 |
| freeing items | 0.000012 |
| cleaning up | 0.000008 |
+----------------------+----------+
9 rows in set, 1 warning (0.00 sec)
  • Вопрос задан
  • 2478 просмотров
Пригласить эксперта
Ответы на вопрос 1
@whats
Это как я понимаю запрос вида
set profiling=1;
CREATE TABLE b_3 (id BIGINT UNSIGNED NOT NULL PRIMARY KEY);
show profiles;

Без всяких транзакций и без вхождения его в процедуру ?
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы