mysql> show global status like 'Qcache_hits';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Qcache_hits   | 0     | 
+---------------+-------+
1 row in set (0.03 sec)
mysql> show global status like 'Com_select';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| Com_select    | 484370 | 
+---------------+--------+
1 row in set (0.05 sec)mysql> show global status like 'Com_insert';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_insert    | 24397 | 
+---------------+-------+
1 row in set (0.04 sec)mysql> show global status like 'Com_delete';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_delete    | 7995  | 
+---------------+-------+
1 row in set (0.03 sec)mysql> show global status like 'Com_update';
+---------------+--------+
| Variable_name | Value  |
+---------------+--------+
| Com_update    | 747809 | 
+---------------+--------+
1 row in set (0.03 sec)mysql> show global status like 'Com_replace';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_replace   | 0     | 
+---------------+-------+
1 row in set (0.03 sec)
mysql>status
....
Threads: 23  Questions: 11524512  Slow queries: 16  Opens: 4093  Flush tables: 1  Open tables: 1024  Queries per second avg: 1492.619
这个Questions怎么不等于com_(select+insert+update+delete+replace)啊?

解决方案 »

  1.   

    你的 status 也算是啊。
      

  2.   

    还有很多其它的 Com_select                
     Com_show_status           
     Com_show_fields           
     Com_admin_commands        
     Com_change_db             
     Com_set_option            
     Com_show_create_table     
     Com_show_function_status  
     Com_show_procedure_status 
     Com_show_tables           
     Com_create_table          
     Com_show_databases        
     Com_show_variables