Author Topic: Redundant Indexes  (Read 1340 times)

apmuthu

  • Freshman
  • *
  • Posts: 28
    • View Profile
Redundant Indexes
« on: December 26, 2012, 12:09:00 AM »
In Feng Office v2.2.1, there are quite a few redundant indexes and a missing Unique index that can be set right with (my db table extension is fo_):

Redundant Key issues:

ALTER TABLE `fo_contact_passwords` DROP INDEX `id`;
ALTER TABLE `fo_contact_permission_groups` DROP INDEX `contact_id`;
ALTER TABLE `fo_object_types` DROP INDEX `name`,
      ADD UNIQUE INDEX `nameclass` (`name`, `handler_class`, `table_name`);
ALTER TABLE `fo_searchable_objects` DROP INDEX `rel_obj_id`;
ALTER TABLE `fo_mail_account_contacts` DROP INDEX `ix_account`;



When ever a field is the first one in a Primary key or in any unique key, it should not be used as a key by itself as it would be redundant.
« Last Edit: December 26, 2012, 12:13:16 AM by apmuthu »