Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13000

slow query log analysis tool

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Patch Available
    • Normal
    • Resolution: Unresolved
    • 5.x
    • Legacy/Observability
    • None

    Description

      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:

      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

      Attachments

        1. 0001-Adds-a-cqldumpslow-tool-which-analyses-the-debug-log.patch
          13 kB
          Murukesh Mohanan
        2. 0001-Adds-a-cqldumpslow-tool-which-analyses-the-debug-log.patch
          15 kB
          Murukesh Mohanan
        3. csqldumpslow.py
          9 kB
          Murukesh Mohanan

        Activity

          People

            muru Murukesh Mohanan
            rustyrazorblade Jon Haddad
            Murukesh Mohanan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: