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

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Won't fix
    • Affects Version/s: 3.0.2
    • Fix Version/s: None
    • Component/s: API (A)
    • Environment:
      Make a request on API with an itemid in params

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: