Not the answer you need?
Register and ask your own question!

Com_XXXX vs Handler_XXX

lagaffelagaffe EntrantCurrent User Role Participant
Hello everybody.

I would like to know the differences between Com_XXX and Handler_XXX status variables.I tried some thing which give strange results and I really don't understand why. For exemple, I thought that Com_XXX count every requests, bad, good, results found into cache or not and Handler_XXX only queries that goes into the engine.BUT :
+
+
+
| Variable_name | Value |
+
+
+
| Com_delete | 1909 |
| Handler_delete | 2175 |
+
+
+

Why Com_delete is smaller???? (it from MySQL 4.0)

On a mysql 5.0.45 :
mysql> SHOW STATUS LIKE '%_delete';
+
+
+
| Variable_name | Value |
+
+
+
| Com_delete | 0 |
| Handler_delete | 0 |
+
+
+
2 rows in set (0.00 sec)

mysql> DELETE FROM Country;
mysql> SHOW STATUS LIKE '%_delete';
+
+
+
| Variable_name | Value |
+
+
+
| Com_delete | 2 |
| Handler_delete | 0 |
+
+
+

Why my DELETE has not been through the engine (MyISAM in that case)?

Comments

  • jrabbitjrabbit Contributor Inactive User Role Advisor
    Maybe because you are deleting all the rows it optimised it internally into a "truncate table" or similar implementation?
  • lagaffelagaffe Entrant Current User Role Participant
    not really, the delete was on a part of the table and was the first sql query.

    Moreover, the delete should normally always go through the datafile. I don't see how it can delete row only working in memory.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.