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

please remove 4 mysql (not needed) indexes

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 3.0.1
    • Installation (I)

      when I installed zabbix-3.0.1, I checked mysql database with pt-duplicate-key-checker (it finds non needed indexes), here's report of that utility with explanation of every reason

      root@ubuntu:~# pt-duplicate-key-checker 
      # ########################################################################
      # zabbix.escalations                                                      
      # ########################################################################
      
      # Key escalations_1 ends with a prefix of the clustered index
      # Key definitions:
      #   UNIQUE KEY `escalations_1` (`actionid`,`triggerid`,`itemid`,`escalationid`)
      #   PRIMARY KEY (`escalationid`),
      # Column types:
      #	  `actionid` bigint(20) unsigned not null
      #	  `triggerid` bigint(20) unsigned default null
      #	  `itemid` bigint(20) unsigned default null
      #	  `escalationid` bigint(20) unsigned not null
      # To shorten this duplicate clustered index, execute:
      ALTER TABLE `zabbix`.`escalations` DROP INDEX `escalations_1`, ADD INDEX `escalations_1` (`actionid`,`triggerid`,`itemid`);
      
      # ########################################################################
      # zabbix.history_log                                                      
      # ########################################################################
      
      # Key history_log_2 ends with a prefix of the clustered index
      # Key definitions:
      #   UNIQUE KEY `history_log_2` (`itemid`,`id`),
      #   PRIMARY KEY (`id`),
      # Column types:
      #	  `itemid` bigint(20) unsigned not null
      #	  `id` bigint(20) unsigned not null
      # To shorten this duplicate clustered index, execute:
      ALTER TABLE `zabbix`.`history_log` DROP INDEX `history_log_2`, ADD INDEX `history_log_2` (`itemid`);
      
      # ########################################################################
      # zabbix.history_text                                                     
      # ########################################################################
      
      # Key history_text_2 ends with a prefix of the clustered index
      # Key definitions:
      #   UNIQUE KEY `history_text_2` (`itemid`,`id`),
      #   PRIMARY KEY (`id`),
      # Column types:
      #	  `itemid` bigint(20) unsigned not null
      #	  `id` bigint(20) unsigned not null
      # To shorten this duplicate clustered index, execute:
      ALTER TABLE `zabbix`.`history_text` DROP INDEX `history_text_2`, ADD INDEX `history_text_2` (`itemid`);
      
      # ########################################################################
      # zabbix.profiles                                                         
      # ########################################################################
      
      # Key profiles_2 ends with a prefix of the clustered index
      # Key definitions:
      #   KEY `profiles_2` (`userid`,`profileid`),
      #   PRIMARY KEY (`profileid`),
      # Column types:
      #	  `userid` bigint(20) unsigned not null
      #	  `profileid` bigint(20) unsigned not null
      # To shorten this duplicate clustered index, execute:
      ALTER TABLE `zabbix`.`profiles` DROP INDEX `profiles_2`, ADD INDEX `profiles_2` (`userid`);
      
      # ########################################################################
      # Summary of indexes                                                      
      # ########################################################################
      
      # Size Duplicate Indexes   82
      # Total Duplicate Indexes  4
      # Total Indexes            484
      

            Unassigned Unassigned
            chipitsine Ilya Shipitsin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: