0

I'm looking for the time of execution of a pack of 552 SQL requests on MySQL. I want one execution time for the 552 requests (or the sum of 552 execution times). Ideally, what I need is an SQL requests based way to do it. My MySQL version is 5.7.

I've done a lot of research (maybe not in a good way because what I found is not that relevant, although it seems to be a common question). I've found this but you can measure only 100 queries max (15 by default). Although I can approach the result by doing:

SELECT SUM(Duration)*5.52 as execTime 
FROM information_schema.profiling

However, I can't change the default query allowed number from "15" to "100" anyway. When I try:

SET profiling_history_size = 100

  • mysql console returns Query OK, 0 row affected, 1 warning
  • phpMyAdmin returns Table 'performance_schema.session_variables' doesn't exists. Note that I've a performance_schema sub-folder in my mysql/data folder but no session_variables.frm file in it.

I would like to know:

  • if there is a way to bypass the 100 queries limit? (even if the method is different)
  • If not, how to change the profiling_history_size value?
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • Perhaps you can try ```SET @@profiling = 0; SET @@profiling_history_size = 0; SET @@profiling_history_size = 100; SET @@profiling = 1;``` – IVO GELOV Jan 06 '22 at 15:24
  • Thanks for the suggestion but it doesn't work (still 15 rows in the `SHOW PROFILES` result – John-Deluxe Jan 09 '22 at 21:43

0 Answers0