{"id":13681636,"url":"https://github.com/akito0107/querydigest","last_synced_at":"2025-09-13T02:08:09.581Z","repository":{"id":84430801,"uuid":"200159146","full_name":"akito0107/querydigest","owner":"akito0107","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-11T10:08:54.000Z","size":1680,"stargazers_count":26,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-02T13:32:47.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akito0107.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-02T03:34:15.000Z","updated_at":"2024-05-02T11:58:30.000Z","dependencies_parsed_at":"2023-03-11T06:01:03.757Z","dependency_job_id":null,"html_url":"https://github.com/akito0107/querydigest","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akito0107%2Fquerydigest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akito0107%2Fquerydigest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akito0107%2Fquerydigest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akito0107%2Fquerydigest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akito0107","download_url":"https://codeload.github.com/akito0107/querydigest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224201706,"owners_count":17272623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T13:01:33.425Z","updated_at":"2024-11-12T01:30:22.901Z","avatar_url":"https://github.com/akito0107.png","language":"Go","readme":"querydigest\n----\n\nMySQL slow query log analyzer.\n\nThis project is very limited version of [pt-query-digest](https://www.percona.com/doc/percona-toolkit/LATEST/pt-query-digest.html).\n\n## Getting Started\n\n### Prerequisites\n- Go 1.12+\n\n### Installing\n```\n$ go get -u github.com/akito0107/querydigest/cmd/querydigest\n```\n\n### How To Use\n\n```\n$ querydigest -f path/to/slow_query_log\n```\n\nthen, summaries appear as below:\n\n```\nQuery 0\n51.103328%\n\nSummary:\ntotal query time:\t107.51s\ntotal query count:\t2969\n\n\\+--------------+---------+------+-------+------+------+--------+--------+\n| ATTRIBUTE    |   TOTAL |  MIN |   MAX |  AVG |  95% | STDDEV | MEDIAN |\n\\+--------------+---------+------+-------+------+------+--------+--------+\n| Exec Time    |    108s | 13us |    3s | 36ms | 83ms |  218ms |  293us |\n| Lock Time    |     27s |  0us | 926ms |  9ms | 27ms |   55ms |   27us |\n| Rows Sent    | 1417.00 | 0.00 |  2.00 | 0.48 | 1.00 |   0.54 |   0.00 |\n| Rows Examine | 2834.00 | 0.00 |  4.00 | 0.95 | 2.00 |   1.08 |   0.00 |\n\\+--------------+---------+------+-------+------+------+--------+--------+\n\nQuery_time distribution:\n  1us:\n 10us:\t###########################################\n100us:\t###########################################################################\n  1ms:\t###############################\n 10ms:\t########################################\n100ms:\t#####\n   1s:\t#\n 10s~:\n\nQueryExample:\nselect * from example_table;\n\n\nQuery 1\n10.935321%\n\nSummary:\ntotal query time:\t23.01s\ntotal query count:\t2469\n\n\\+--------------+-------+-------+-------+------+------+--------+--------+\n| ATTRIBUTE    | TOTAL |   MIN |   MAX |  AVG |  95% | STDDEV | MEDIAN |\n\\+--------------+-------+-------+-------+------+------+--------+--------+\n| Exec Time    |   23s | 119us | 349ms |  9ms | 47ms |   21ms |    2ms |\n| Lock Time    |    4s |  10us | 101ms |  2ms | 11ms |    7ms |   23us |\n| Rows Sent    |  0.00 |  0.00 |  0.00 | 0.00 | 0.00 |   0.00 |   0.00 |\n| Rows Examine |  0.00 |  0.00 |  0.00 | 0.00 | 0.00 |   0.00 |   0.00 |\n\\+--------------+-------+-------+-------+------+------+--------+--------+\n\nQuery_time distribution:\n  1us:\n 10us:\n100us:\t####################################################################\n  1ms:\t###########################################################################\n 10ms:\t###################################\n100ms:\t#\n   1s:\n 10s~:\n\nQueryExample:\nselect * from example_table2;\n\n.....\n```\n\nBy default, `querydigest` analyzes and shows all queries from given slow query log. If you want to display only top `n` items, please use `-n` option.\n\n```\n$ querydigest -f path/to/slow_query_log -n 10\n```\n\n## Limitations\nCurrently, `querydigest` can't parse and analyze all queries supported by MySQL. These queries are excluded from analysis.\n\nAll statistics are approximate value, and there are no guarantee of accuracy.\n\n## Options\n```\n$ querydigest -help\nUsage of bin/querydigest:\n  -f string\n    \tslow log filepath (default \"slow.log\")\n  -j int\n    \tconcurrency (default = num of cpus)\n  -n int\n    \tcount\n```\n\n## License\nThis project is licensed under the Apache License 2.0 License - see the [LICENSE](LICENSE) file for details\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakito0107%2Fquerydigest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakito0107%2Fquerydigest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakito0107%2Fquerydigest/lists"}