???????SQL??й???
????
1???????????????????SQL???
????2???????????????????????????????????????????????
????3??????????????????????????SQL?????????????????????????????в????
????4?????????????????У?????????????????????????????
????5???????????????????????????????????????????????????tmpdir????????????????????

???????
??????????????????з????????????????????innodb_buffer_pool??innodb?洢??????????е????????????
???????SQL?????????????????SQL???????????SQL????????????????ò????????????????????????????
???????????SQL??м???????????(???????????)??
????
1????????????????
????2?????????I/O??
????3????????????CPU
????4??????????
????5?????????????????
?????????ж????SQL?????????????
????
????SQL??е????????????????ж??
????1??????ж??????????????
??mysql> show global status like 'Threads_created';
????+-----------------+-------+
????| Variable_name   | Value |
????+-----------------+-------+
????| Threads_created | 5     |
????+-----------------+-------+
????1 row in set (0.00 sec)

????2??????ж????????????
????mysql> show global status like 'Innodb%read%';
????+---------------------------------------+----------+
????| Variable_name                         | Value    |
????+---------------------------------------+----------+
????| Innodb_buffer_pool_read_ahead_rnd     | 0        |
????| Innodb_buffer_pool_read_ahead         | 2303     |
????| Innodb_buffer_pool_read_ahead_evicted | 0        |
????| Innodb_buffer_pool_read_requests      | 137140   |
????| Innodb_buffer_pool_reads              | 662      |
????| Innodb_data_pending_reads             | 0        |
????| Innodb_data_read                      | 49271296 |
????| Innodb_data_reads                     | 3130     |
????| Innodb_pages_read                     | 2964     |
????| Innodb_rows_read                      | 369      |
????+---------------------------------------+----------+
????10 rows in set (0.01 sec)
?????????
????1??Innodb_buffer_pool_reads??innodb??????????     
????2??Innodb_data_reads???????IO???????      
????3??Innodb_pages_read???????page??????      
????3??????ж??????????????(???)
??mysql> show global status like 'Innodb_rows_read';
????+------------------+-------+
????| Variable_name    | Value |
????+------------------+-------+
????| Innodb_rows_read | 369   |
????+------------------+-------+
????1 row in set (0.00 sec)
????Innodb_rows_read??????????????????????????????????????????(???????????)
????4??????ж??????????????
????mysql> show global status like 'sort_merge_passes';
????+-------------------+-------+
????| Variable_name     | Value |
????+-------------------+-------+
????| Sort_merge_passes | 0     |
????+-------------------+-------+
????1 row in set (0.00 sec)
????sort_merge_passes??????????鰱????????
????5????β????紫????
????mysql> show global status like '%bytes%';
????+--------------------------------+----------+
????| Variable_name                  | Value    |
????+--------------------------------+----------+
????| Bytes_received                 | 8943228  |
????| Bytes_sent                     | 10775680 |
????| Innodb_buffer_pool_bytes_data  | 49741824 |
????| Innodb_buffer_pool_bytes_dirty | 0        |
????+--------------------------------+----------+
????4 rows in set (0.01 sec)
??????????????????
????
??????????????????????MySQL????????????????????????????????????????????????????????ò??????????????????????????????????????????????????????????????????????????????????????????????????
????mysql> show variables like 'tmpdir';
????+---------------+-------+
????| Variable_name | Value |
????+---------------+-------+
????| tmpdir        | /tmp  |
????+---------------+-------+
????1 row in set (0.01 sec)