Turn: Http://www.2cto.com/database/201304/204320.html mysql Status and variables difference First you can see the corresponding system parameters of MySQL by the subordinate two commands show status like '%abc% '; show variables like '%abc% '; But a lot of people don't understand what the difference is. Status is the state of the system is not changed, is the system is now running state parameters, described as follows: Java code mysql> Show status like ' innodb_rows_% '; +----------------------+---------+ | Variable_name | Value | +----------------------+---------+ | Innodb_rows_deleted | 0 | | innodb_rows_inserted | 1169098 | | Innodb_rows_read | 7955216 | | Innodb_rows_updated | 0 | +----------------------+---------+ 4 rows in Set (0.00 sec) descriptions are as follows: | Innodb_rows_deleted|0 | Number of rows deleted for InnoDB table, 0 marked not Removed | innodb_rows_inserted | 1169098 | The number of rows to insert for the InnoDB table, indicated here now insert 1169098 rows | Innodb_rows_read | 7955216 | Execute for InnoDB tableNumber of rows fetched by select | Innodb_rows_updated | 0 | The number of rows involved in update for the InnoDB table the above 4 are the running state parameters of the InnoDB table, can not be artificially modified, only the system to update, the use is obviously to tell the DBA now the state of the system, so that the DBA to do the optimization, the above 4 records tell the DBA at this time read greater than write ( I am performing insert into a select * from a, so out of the above data), you can consider establishing an appropriate index, if the reading is 0, write very large, then you can consider deleting index and so on. Java code mysql> Show variables like ' query% '; +------------------------------+----------+ | Variable_name | Value | +------------------------------+----------+ | Query_alloc_block_size | 8192 | | Query_cache_limit | 1048576 | | Query_cache_min_res_unit | 4096 | | Query_cache_size | 16777216 | | Query_cache_type | On | | Query_cache_wlock_invalidate | OFF &NBsp;| | Query_prealloc_size | 8192 | +------------------------------+----------+ 7 rows in Set (0.00 sec) above to view information about the query cache, At this point you can do the appropriate optimization according to the status here is the configuration information of the system cache, which can be modified by setting or modifying the configuration file.
Go mysql-status and variables differences