XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Fixed
    • Icon: Critical Critical
    • None
    • None
    • Server (S)
    • Sprint 26

      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.

            Unassigned Unassigned
            splitice Mathew
            Team A
            Votes:
            23 Vote for this issue
            Watchers:
            33 Start watching this issue

              Created:
              Updated:
              Resolved: