开发者

Getting a precise execution time of a MySQL statement

Right now the results indicate X rows in set (0.00 sec). So I am wondering if there's a way I can get the time in more than 2开发者_如何学运维 decimal places.


Execute set profiling=1 before running your statement, then obtain timings with show profiles query .

See SHOW PROFILES syntax for more details, including how to find out what actions are using time inside your query, such as checking permissions , logging etc.


As far as I know - exactly what you want is not possible. You can, however, modify your query to force not to use any cache SELECT SQL_NO_CACHE id, name FROM customer and run that 100 times and then divide your answer by 100 :)

Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜