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

Some SQL statements are quite slow

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 1.8.3
    • 1.8.2
    • Frontend (F)
    • None
    • 1.8.2, PostgreSQL 8.3, 3M of records in table 'events'.

      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.

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

              Created:
              Updated:
              Resolved: