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

Clickhouse query optimized for Query Analytics to improve its speed and reduce the load on the backend

Details

    • Improvement
    • Status: Done
    • High
    • Resolution: Done
    • 2.3.0
    • 2.4.0
    • QAN API
    • 2
    • Yes
    • Yes
    • No
    • No

    Description

      Looks like we have some strange Query in QAN :

      SELECT service_name, database, schema, username, client_host, replication_set, cluster, service_type, service_id, environment,az,region,
      node_model,node_id,node_name,node_type,machine_id,container_name,container_id,agent_id,agent_type,labels.key AS lkey,
      labels.value AS lvalue FROM metrics LEFT ARRAY JOIN labels
      WHERE period_start >= toDateTime(1574642098) AND period_start <= toDateTime(1582418098)
      ORDER BY service_name, database, schema, username, client_host, replication_set, cluster, service_type, service_id,
      environment,az,region,node_model,node_id,node_name,node_type, machine_id,container_name,container_id,
      agent_id,agent_type,labels.key,labels.value

      It's returning ALL possible data and very slow
      In addition, it's overload backend

      TODO: optimize it

      Attachments

        Activity

          People

            Unassigned Unassigned
            roma.novikov Roma Novikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 5 hours
                5h

                Smart Checklist