Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #3018] Redundant indexes in MySQL schema. #1087
This issue has been migrated from Redmine: https://dev.icinga.com/issues/3018
Created by robe on 2012-08-25 14:47:28 +00:00
2012-09-16 15:35:05 +00:00 by mfriedrich be502d8
Updated by robe on 2012-08-25 15:01:05 +00:00
In #1173 the default type for all PRIMARY KEY columns was changed to serial. This causes MySQL to create two indexes over the same column - one for the serial column type and one for enforcing the PRIMARY KEY.
This causes wasted disk space and increased IOPS when writing to the tables in question. Please revert all serial PRIMARY KEY columns to
and keep the PRIMARY KEY in place.
See http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html for SERIAL and BIGINT documentation and http://dev.mysql.com/doc/refman/5.5/en/create-table.html for the PRIMARY KEY implications.
Updated by mfriedrich on 2012-09-16 15:40:05 +00:00
up in my mfriedrich/ido branch - thanks Michael for the patch.
dropping indexes might take a bit, so if users complain that the script takes too long, just tell them the url to this issue (or check what the upgrade script does).