mysql-5.6 icon indicating copy to clipboard operation
mysql-5.6 copied to clipboard

clock_gettime calls in sql_optimizer.cc account for ~4% of CPU time in the worst case

Open mdcallag opened this issue 1 year ago • 2 comments

In the worst case (simple query such as fetch one row by PK) the usage of clock_gettime in sql_optimizer.cc accounts for ~4% of CPU time. The usage is here and is here.

Must this always be enabled?

mdcallag avatar Aug 06 '24 23:08 mdcallag

Could you try enable_optimizer_cputime_with_wallclock=on and enable_cputime_with_wallclock=on?

yoshinorim avatar Aug 06 '24 23:08 yoshinorim

with that the overhead is ~3% of CPU time

mdcallag avatar Aug 07 '24 00:08 mdcallag