How can I measure the execution time of a query without measuring the time it spends waiting for a lock release etc? My only idea was to continuously measure same query and record the fastest time. 解决方案 Start the profiler with SET profiling = 1;Then execute your Query.WithSHOW PROFILES;you see a list of queries the profiler has statistics for. And finally you choose which query to examine withSHOW PROFILE FOR QUERY 1;or whatever number your query has.What you get is a list where exactly how much time was spent during the query.More info in the manual. 这篇关于测量实际的MySQL查询时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!