K
K
king5552014-10-20 13:56:48
linux
king555, 2014-10-20 13:56:48

Percona(MySql) why are tables being created for a long time?

Server version: 5.6.19-67.0-log Percona Server (GPL), Release 67.0, Revision 618
It takes a very long time to create INNODB tables (myIsam is many times faster)
show profiles;
+----------+-----------+------------------------- ------------------------------------+
| QueryID | 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 |
| free items | 0.000015 |
| cleaning up | 0.000008 |
+---------------------+----------+
9 rows in set, 1 warning (0.00 sec)
mysql> show profile for query2;
+----------------------+----------+
| 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 |
| free items | 0.000012 |
| cleaning up | 0.000008 |
+---------------------+----------+
9 rows in set, 1 warning (0.00 sec)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
whats, 2014-10-20
@whats

This is how I understand the request of the form

set profiling=1;
CREATE TABLE b_3 (id BIGINT UNSIGNED NOT NULL PRIMARY KEY);
show profiles;

Without any transactions and without entering it into the procedure?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question