The current average execution time is a long, and as you said it will not be meaningful for queries that take less than 1 ms.
I want to get all queries, sorted by total execution time. Current API don't allow me get total execution time directly. Total time obtained by multiplying the average amount of time and useless due to rounding error.
Are you saying that in your applications, most queries take less than 1ms?
The peculiarity of my application:
- application and database (PgSQL or MySQL) located at the same host;
- database cache is enough to fit whole database in memory;
- SQL queries is really simple (like SELECT * FROM foo WHERE id = 42).
In this situation, it is possible to get time of about 1 ms response. |