Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-1843

Collect Stored Procedure details from slow query log

    Details

    • Type: New Feature
    • Status: New
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: QAN Agent
    • Labels:

      Description

      Hi, 

      At the moment we do not collect if a query was running inside a stored procedure or not. This is a Percona Server specific feature. 

      # Time: 2017-12-05T14:21:48.688175Z
      # User@Host: web_adm[web_adm] @ xxxxxxx Id: 276673
      # Schema: ccg Last_errno: 0 Killed: 0
      # Query_time: 2.412483 Lock_time: 2.412147 Rows_sent: 0 Rows_examined: 6438 Rows_affected: 1
      # Bytes_sent: 0 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
      # Stored_routine: ccg.TransactionCreateTransaction
      # InnoDB_trx_id: 6623F34E
      # QC_Hit: No Full_scan: Yes Full_join: No Tmp_table: No Tmp_table_on_disk: No
      # Filesort: No Filesort_on_disk: No Merge_passes: 0
      # InnoDB_IO_r_ops: 0 InnoDB_IO_r_bytes: 0 InnoDB_IO_r_wait: 0.000000
      # InnoDB_rec_lock_wait: 2.409000 InnoDB_queue_wait: 0.000000
      # InnoDB_pages_distinct: 278
      SET timestamp=1512483708;
      UPDATE Users SET Balance= NAME_CONST('dUserBalance',xxxxx) WHERE UserID= NAME_CONST('_UserID',xxxxx);

      There is a line in the slow log: Stored_routine: db.procedure

      Tasks

      1. We should also parse and store the Stored_routine
      2. We should provide ability display only the queries from a specific Stored_routine item, so that a User could inspect all the queries from a sample SP execution

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tibor.korocz Tibor Korocz
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: