PhpMyAdmin tool is showing me query execution time, like "Query took 0.0040 seconds" in the image below)
However, when I am trying to run a stored procedure (stored routine), PhpMyAdmin does NOT show me any data about execution time.
How can I benchmark the execution time of my stored procedure in PhpMyAdmin without writing any additional MySQL code?
P.S. Here is an example on how to benchmark MySQL procedure by writing your own benchmarking code, which I do NOT want to do, I just need some very basic idea of the execution time of my procedure and I beleive it should be provided by a client-side tool like PhpMyAdmin
I dont know how to answer your exact question i.e. how to make PhpMyAdmin show procedure timing without writing any custom benchmarking code. I can only provide a solution where you would need to write some extra MySQL code just to benchmark your other MySQL code
You can measure the execution time (in microseconds i.e. 1 uS = 0.000,001 sec) using the following code (note the "YOUR CODE" part):
CREATE PROCEDURE get_execution_time() BEGIN DECLARE start_time bigint; DECLARE end_time bigint; -- Fix start time in microseconds SET @start_time = (UNIX_TIMESTAMP(NOW()) * 1000000 + MICROSECOND(NOW(6))); -- YOUR CODE -- Fix end time in microseconds SET @end_time = (UNIX_TIMESTAMP(NOW()) * 1000000 + MICROSECOND(NOW(6))); -- Result select (@end_time - @start_time) / 1000; END