Details

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

      Description

      Sometimes mysql writes to a slow log requests with prepended `use database`. And I guess some of library we use to connect to mysql, adds this command to SQL statements.

      For example:

       

      # Time: 171128 14:00:10
      # User@Host: user1[user1] @ example.com [127.0.0.1]
      # Thread_id: 64818300 Schema: db1 QC_hit: No
      # Query_time: 2.791015 Lock_time: 0.000024 Rows_sent: 142 Rows_examined: 1685471
      # Rows_affected: 0
      # Full_scan: Yes Full_join: No Tmp_table: No Tmp_table_on_disk: No
      # Filesort: No Filesort_on_disk: No Merge_passes: 0 Priority_queue: No
      #
      # explain: id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
      # explain: 1 SIMPLE tbl1 index NULL index_tbl1_on_owner_id 4 NULL 1640857 1685471.00 100.007.35 Using where
      #
      use db1;
      SET timestamp=1511866810;
      SELECT DISTINCT `tbl1`.`owner_id` FROM `tbl1` WHERE (`tbl1`.`created_at` >= '2017-11-27 21:00:00');
      

      But QAN decides that fingerprint of this query is:

       

      use ?

       

      instead of:

       

      SELECT DISTINCT `tbl1`.`owner_id` FROM `tbl1` WHERE (`tbl1`.`created_at` >= ?)

      Would be fine, if QAN will ignore `use` command in compound statements.

      Is it possible?

       

       

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kompastver Pavel Znamensky
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: