mysql query execution time - can i get this in milliseconds? [duplicate]

一笑奈何 提交于 2020-01-01 08:41:52

问题


Possible Duplicate:
how to get load time in milliseconds or microseconds in mysql

I'm comparing a few different approaches to getting some data in mysql, directly at the console, using the SQL_NO_CACHE option to make sure mysql keeps running the full query every time. Mysql gives me the execution time back in seconds, to two decimal places. I'd really like to get the result back in milliseconds (ideally to one or two decimal places), to get a better idea of improvements (or lack of). Is there an option i can set in mysql to achieve this?

thanks, max


回答1:


The answer is to enable the mysql profiler and then check it after you run your queries.

mysql> set profiling=1;


来源:https://stackoverflow.com/questions/2825838/mysql-query-execution-time-can-i-get-this-in-milliseconds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!