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

Slow queries when running zbx_dbsync_compare_trigger_tags

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 6.0.1rc1, 6.2.0alpha1, 6.2 (plan)
    • 5.4.9
    • Server (S)
    • Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022)
    • 1

      Steps to reproduce:

      1. Set in zabbix_server config parameter
        CacheUpdateFrequency=60

      Result:
      Every minuteĀ 

      slow query: 3.816762 sec, "select distinct tt.triggertagid,tt.triggerid,tt.tag,tt.value from trigger_tag tt,triggers t,hosts h,items i,functions f where t.triggerid=tt.triggerid and t.flags<>2 and h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=tt.triggerid and h.status in (0,1)"

      HashAggregate (cost=268197.80..324806.64 rows=1268142 width=50) (actual time=2860.942..3699.744 rows=1147489 loops=1)

      Its consuming 50MB of mem and writes a temp file to disk for ~120MB each time.

      It is unlikely that this can be called a bug, but perhaps this query can be optimized.

      Expected:
      Fast sync

            vso Vladislavs Sokurenko
            yuriip Yurii Polenok
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: