How to measure elapsed time more precisely

Hi everyone,

If the elapsed time of query execution is “0.00 sec”,
Is there any way to measure more precisely? (e.g. 3 ms)

Best regards.

There are a couple of ways. You can look at the elapsed time in the JSON PROFILE plan. That is down to the ms. Or, you can do this in an anonymous code block or stored procedure:

v1 = now(6);
< run your command >
v2 = now(6);
< subtract @v2 - @v1 >
1 Like

dbbench has some granular output too and is also helpful to see how the query changes after it’s been run a few times and / or when run concurrently.

1 Like