[ https://issues.apache.org/jira/browse/CASSANDRA-13000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17941720#comment-17941720 ]
Brad Schoening edited comment on CASSANDRA-13000 at 4/8/25 1:36 AM: -------------------------------------------------------------------- [~pedro_gordo] [~smiklosovic] I reviewed Pedro's recent changes to the PR and while I appreciate the effort he has put into resolving this, I have general concerns about the usefulness of a csqldumpslow script: (1) does this add value over simply using 'grep' on the CLI that justifies the code maintenance going forward? (2) if so, would it be better if it was implemented as a virtual table? (3) without unit tests, how will this be kept in-sync with any format changes to slow query logging? Both [CASSANDRA-13001|https://isues.apache.org/jira/browse/CASSANDRA-13001] and Datastax's [node_slow_log|https://docs.datastax.com/en/opscenter/6.8/online-help/services/configuring-slow-query-log.html] table seem better approaches. was (Author: bschoeni): [~pedro_gordo] [~smiklosovic] I reviewed Pedro's recent changes to the PR and while I appreciate the effort he has put into resolving this, I have general concerns about the csqldumpslow script: (1) does this add value over simply using 'grep' on the CLI that justifies the code maintenance going forward? (2) if so, would it be better if it was implemented as a virtual table? (3) without unit tests, how will this be kept in-sync with any format changes to slow query logging? Both [CASSANDRA-13001|https://isues.apache.org/jira/browse/CASSANDRA-13001] and Datastax's [node_slow_log|https://docs.datastax.com/en/opscenter/6.8/online-help/services/configuring-slow-query-log.html] table seem better approaches. > slow query log analysis tool > ---------------------------- > > Key: CASSANDRA-13000 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13000 > Project: Apache Cassandra > Issue Type: New Feature > Components: Legacy/Observability > Reporter: Jon Haddad > Assignee: Pedro Gordo > Priority: Normal > Fix For: 5.x > > Attachments: > 0001-Adds-a-cqldumpslow-tool-which-analyses-the-debug-log.patch, > 0001-Adds-a-cqldumpslow-tool-which-analyses-the-debug-log.patch, > csqldumpslow.py, slow_queries_parser_output.txt > > > As a follow up to CASSANDRA-12403, it would be very helpful to have a tool to > process the slow queries that are logged. In the MySQL world, there's a tool > called mysqldumpslow, which processes a slow query log, abstracts the > parameters to prepared statements, and shows the queries which are causing > problems based on frequency. The {{mysqldumpslow}} utillity shows an > aggregated count & time statistics spent on slow queries. For instance: > {code}shell> mysqldumpslow > Reading mysql slow query log from > /usr/local/mysql/data/mysqld51-apple-slow.log > Count: 1 Time=4.32s (4s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost > insert into t2 select * from t1 > Count: 3 Time=2.53s (7s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost > insert into t2 select * from t1 limit N > Count: 3 Time=2.13s (6s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost > insert into t1 select * from t1{code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org