What is the difference between Com_xxx and handler_xxx? Initially my com_delete variable and handler_xxx variables are nil.


| Com_delete     | 0     |+
| Handler_delete | 0     | 
+----------------+-------+

then I issued a delete query delete from gt where i=1;

when I checked both the variables it changed to 1.

My Question is what these variables differentiate ? I'm using MySQL 5.6
Com_delete is number of times a user sent DELETE command to MySQL.

Handler_delete is number of times MySQL server sent delete handler to a storage engine via internal API

To illustrate the difference here's an example:

mysql&gt; delete from t1 where id &lt; 100;
Query OK, 88 rows affected (0.00 sec)

mysql&gt; show status like 'Com_delete';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_delete    | 1     |
+---------------+-------+
1 row in set (0.00 sec)

mysql&gt; show status like 'Handler_delete';
+----------------+-------+
| Variable_name  | Value |
+----------------+-------+
| Handler_delete | 88    |
+----------------+-------+
1 row in set (0.00 sec)