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

Api request on itemids: wrong cast to mysql request => poor performance

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Major Major
    • None
    • 3.0.2
    • API (A)
    • Make a request on API with an itemid in params

      hi,

      when i run this request on api point :

      {"params":{"sortfield":"clock","sortorder":"INC","itemids":25620,"history":0},"jsonrpc":"2.0","method":"history.get","auth":"99f5cbce8a4fc99b802f4d45fdb3ec77","id":"1"}
      

      the request run by zabbix api to mysql is:

      SELECT h.* FROM history h WHERE h.itemid='25620' ORDER BY h.clock;
      

      Or the cast to string of the id is very expensive for mysql because the index is not efficient.

      Best regards

            Unassigned Unassigned
            lollo Laurent labatut
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: