XMLWordPrintable

    Details

    • Type: Change Request
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Server (S)
    • Labels:
    • Team:
      Team A
    • Sprint:
      Sprint 26

      Description

      A primary key in the database can be shown to have significant performance benifits, particularly in a database engine such as InnoDB or Tokudb which clusters the row based on this index.

      However it is not currently possible to use a primary key in the history* tables due to the server occasionally attempting to insert the same row twice.

      A simple protection against this is to add in zbx_db_insert_execute

      #ifdef HAVE_MYSQL
      	zbx_strcpy_alloc(&sql_command, &sql_command_alloc, &sql_command_offset, " ON DUPLICATE KEY UPDATE value=VALUE(value)");
      #endif
      

      This should have no (negative) effect on the current schema, however allows experts to modify their schema possibly with a primary key.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zabbix.dev Zabbix Development Team
              Reporter:
              splitice Mathew
              Votes:
              23 Vote for this issue
              Watchers:
              29 Start watching this issue

                Dates

                Created:
                Updated: