/
Inefficient index placement in "Changes Log" db table [5.2.2-B1]
Inefficient index placement in "Changes Log" db table [5.2.2-B1]
Currently the index in MySQL database table used for "Changes Log" section data storage is placed on "MasterPrefix" and "Prefix" columns. This doesn't cover the most common use case, when searching for specific item (prefix + id combination).
Solution
- drop existing indexes on MasterPrefix & Prefix columns
add following indexes instead:
ALTER TABLE ChangeLogs ADD INDEX `IDX_MASTER_ITEM` (MasterPrefix, MasterId); ALTER TABLE ChangeLogs ADD INDEX `IDX_ITEM` (Prefix, ItemId);