I want to know how many number of Select statements that got executed in MySQL server. Also I want to exclude the queries that are executing from query cache.
I thought status variable 'com_select' gives the required one. But it is not giving proper result.
Following is the test case, I had followed:
1) Restarted MySQL Service.
2) Executed Show Global Status and following is the result:
Com_select - 1
Qcache_hits - 0
Qcache_inserts - 0
3) Next executed one select statement.
4) Then executed Show Global Status and following is the result:
Com_select - 4
Qcache_hits - 0
Qcache_inserts - 1
5) Again executed same select statement which I had executed earlier
6) Then executed Show Global Status and following is the result:
Com_select - 6
Qcache_hits - 1
Qcache_inserts - 1
For every Select/Show statement, com_select is getting incremented. I had tried the same test case two to three times, But still the result is same.
So Is there any way to get exact number of Select statements that got executed by excluding statements that are getting executed from 'query cache'
Is there any way to narrow down the size of com_select.
Also, what about the update statements. will the update statements get cached..?
Com_select - Qcache_hitsnot what you are looking for? – Derek Downey Jan 31 '12 at 20:44