Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-536

Missing index on device_graphs

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • None
    • None
    • None

    Description

      On our instance this table has about 112,000 rows. Every time queries for the device graphs were causing a scan of the table.

      Check out the before and after. Adding the index lowered the number of rows scanned from 112K to 15.

      SELECT `graph` FROM `device_graphs` WHERE `device_id` = '2745';
      

      create index device_graphs_device_id ON device_graphs(device_id);
      

      Attachments

        Activity

          People

            adama Adam Armstrong
            jcustenborder Jeremy Custenborder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: