-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsql-server: track slowest queries too
This PoC adds another stats entry - slowest queries, since they do not necessarily match the *most expensive* queries we count right now. Ideas to entertain: - tracking aggregated query time - tracking the number of times the query was received (to ignore oneshot hyperlong queries as less interesting than lots of fairly-long queries) Example: ``` $ curl -s http://localhost:8081/v1/namespaces/default/stats | jq '.slowest_queries' | jtbl elapsed_ms query ------------ ------------------------------ 44 SELECT count (*) FROM t; 63 SELECT count (*) FROM t; 3483 INSERT INTO t SELECT * FROM t; ```
- Loading branch information
Showing
3 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters