| end? ? ? ? ? ? ? ? ? ? ? ? ? ? | 0.000014 | 0? ? ? ? | 0? ? ? ? ? |? ? ? ? ? ? 0 |? ? ? ? ? ? 0 |
| query end? ? ? ? ? ? ? ? ? ? ? | 0.000006 | 0? ? ? ? | 0? ? ? ? ? |? ? ? ? ? ? 0 |? ? ? ? ? ? 0 |
| storing result in query cache? | 0.000006 | 0? ? ? ? | 0? ? ? ? ? |? ? ? ? ? ? 0 |? ? ? ? ? ? 0 |
| freeing items? ? ? ? ? ? ? ? ? | 0.000012 | 0? ? ? ? | 0? ? ? ? ? |? ? ? ? ? ? 0 |? ? ? ? ? ? 0 |
| closing tables? ? ? ? ? ? ? ? | 0.000009 | 0? ? ? ? | 0? ? ? ? ? |? ? ? ? ? ? 0 |? ? ? ? ? ? 0 |
| logging slow query? ? ? ? ? ? | 0.000183 | 0? ? ? ? | 0? ? ? ? ? |? ? ? ? ? ? 0 |? ? ? ? ? ? 0 |
+--------------------------------+----------+----------+------------+--------------+---------------+
17 rows in set (0.00 sec)
mysql> insert into t(username) select username from t;
Query OK, 2097152 rows affected (34.17 sec)
Records: 2097152? Duplicates: 0? Warnings: 0
mysql> show profiles;
+----------+-------------+------------------------------------------------+
| Query_ID | Duration? ? | Query? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+----------+-------------+------------------------------------------------+
|? ? ? ? 1 |? 0.02717000 | show tables? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 2 |? 0.74770100 | select count(*) from t? ? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 3 |? 0.00004200 | show prifile for query 2? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 4 | 34.30410100 | insert into t(username) select username from t |
+----------+-------------+------------------------------------------------+
4 rows in set (0.00 sec)
mysql> show profile cpu,block io,memory,swaps for query 4;
mysql> select count(*) from t;
+----------+
| count(*) |
+----------+
|? 4194304 |
+----------+
1 row in set (1.51 sec)
mysql> show profiles;
+----------+-------------+------------------------------------------------+
| Query_ID | Duration? ? | Query? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+----------+-------------+------------------------------------------------+
|? ? ? ? 1 |? 0.02717000 | show tables? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 2 |? 0.74770100 | select count(*) from t? ? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 3 |? 0.00004200 | show prifile for query 2? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 4 | 34.30410100 | insert into t(username) select username from t |
|? ? ? ? 5 |? 1.50563800 | select count(*) from t? ? ? ? ? ? ? ? ? ? ? ? |
+----------+-------------+------------------------------------------------+
5 rows in set (0.00 sec)
mysql> show profile cpu,block io,memory,swaps,context switches,source for query 5;
……
mysql> update t set username = 'waill';
Query OK, 4194304 rows affected (44.82 sec)
Rows matched: 4194304? Changed: 4194304? Warnings: 0
mysql> show profiles;
+----------+-------------+------------------------------------------------+
| Query_ID | Duration? ? | Query? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+----------+-------------+------------------------------------------------+
|? ? ? ? 1 |? 0.02717000 | show tables? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 2 |? 0.74770100 | select count(*) from t? ? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 3 |? 0.00004200 | show prifile for query 2? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 4 | 34.30410100 | insert into t(username) select username from t |
|? ? ? ? 5 |? 1.50563800 | select count(*) from t? ? ? ? ? ? ? ? ? ? ? ? |
|? ? ? ? 6 | 44.82054700 | update t set username = 'waill'? ? ? ? ? ? ? ? |
+----------+-------------+------------------------------------------------+
6 rows in set (0.00 sec)
mysql> show profile cpu,block io,memory,swaps,context switches,source for query 6;