2

As the title says, I'm wondering what is this command and why am I seeing a large amount of this query on my database? It's currently 13.30% of my total queries. I've tried googling this but there's not really any documentation on the subject.

Here's a part of the report done by mysqlreport:

__ Questions ___________________________________________________________
Total          17.43M     7.5/s
  DMS           8.58M     3.7/s  %Total:  49.23
  QC Hits       3.91M     1.7/s           22.42
  Com_          2.54M     1.1/s           14.54
  COM_QUIT      2.48M     1.1/s           14.21
  -Unknown     68.28k     0.0/s            0.39
Slow 10 s          17     0.0/s            0.00  %DMS:   0.00  Log:  ON
DMS             8.58M     3.7/s           49.23
  SELECT        6.05M     2.6/s           34.71         70.51
  INSERT        1.36M     0.6/s            7.80         15.85
  UPDATE        1.15M     0.5/s            6.60         13.40
  DELETE       20.35k     0.0/s            0.12          0.24
  REPLACE          61     0.0/s            0.00          0.00
Com_            2.54M     1.1/s           14.54
  set_option    2.32M     1.0/s           13.30
  show_proces  83.16k     0.0/s            0.48
  create_tabl  60.20k     0.0/s            0.35

2 Answers 2

4

It probably means that you ran a lot of commands that start with "SET something = somethingelse;"

I would say to set your general_log on for a short while on your dev environment and search for SET commands. It would probably be something to do with setting the server time.

http://dev.mysql.com/doc/refman/5.5/en/server-status-variables.html#statvar_Com_xxx

2
  • Thanks, figured out this was because of SET NAMES utf8. Commented Sep 14, 2011 at 8:13
  • Actually COM_SET_OPTION is used exclusively for multi-statement support as explained here. SET commands issued by clients are just sent as regular queries, so something like SET NAMES utf8 would not generate a COM_SET_OPTION packet. Commented Dec 17, 2014 at 23:04
0

COM_SET_OPTION is a special command in the MySQL protocol which is currently used exclusively to enable or disable multi-statement support as detailed here. Some database clients (such as certain versions of the MySQL libraries for PHP) will do this every time a new connection is established.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.