Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-2367

Some SQL statements are quite slow

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.3
    • Component/s: Frontend (F)
    • Labels:
      None
    • Environment:
      1.8.2, PostgreSQL 8.3, 3M of records in table 'events'.

      Description

      The following SQL statement takes 30 seconds:

      SELECT DISTINCT e.* FROM events e WHERE ((e.eventid BETWEEN 000000000000000 AND 099999999999999)) ORDER BY e.eventid ASC LIMIT 1 OFFSET 0;

      Without DISTINCT it needs 0.1 second or less.

      We should not use DISTINCT if data is selected from one table. Front-end code should be reviewed.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            alexei Alexei Vladishev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: