XMLWordPrintable

Details

    • Change Request
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • None
    • Server (S)
    • Team A
    • 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

              Unassigned Unassigned
              splitice Mathew
              Votes:
              23 Vote for this issue
              Watchers:
              34 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: