From bb61951098fb71c43d2f606727d43d22c729089f Mon Sep 17 00:00:00 2001
From: akrus <akrus@flygroup.st>
Date: Mon, 4 Feb 2013 14:13:38 +0400
Subject: Getting rid of unused indexes. Source:
 http://dev.mysql.com/doc/refman/5.5/en/multiple-column-indexes.html If the
 table has a multiple-column index, any leftmost prefix of the index can be
 used by the optimizer to find rows. For example, if you have a three-column
 index on (col1, col2, col3), you have indexed search capabilities on (col1),
 (col1, col2), and (col1, col2, col3).

---
 sql-files/main.sql | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

(limited to 'sql-files/main.sql')

diff --git a/sql-files/main.sql b/sql-files/main.sql
index f159260f1..e69279710 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -111,7 +111,6 @@ CREATE TABLE IF NOT EXISTS `char` (
   KEY `account_id` (`account_id`),
   KEY `party_id` (`party_id`),
   KEY `guild_id` (`guild_id`),
-  KEY `name` (`name`),
   KEY `online` (`online`)
 ) ENGINE=MyISAM AUTO_INCREMENT=150000; 
 
@@ -181,8 +180,7 @@ CREATE TABLE IF NOT EXISTS `hotkey` (
 	`type` TINYINT(1) unsigned NOT NULL default '0',
 	`itemskill_id` INT(11) unsigned NOT NULL default '0',
 	`skill_lvl` TINYINT(4) unsigned NOT NULL default '0',
-	PRIMARY KEY (`char_id`,`hotkey`),
-	INDEX (`char_id`)
+	PRIMARY KEY (`char_id`,`hotkey`)
 ) ENGINE=MyISAM;
 
 --
@@ -196,8 +194,7 @@ CREATE TABLE IF NOT EXISTS `global_reg_value` (
   `type` tinyint(1) NOT NULL default '3',
   `account_id` int(11) unsigned NOT NULL default '0',
   PRIMARY KEY  (`char_id`,`str`,`account_id`),
-  KEY `account_id` (`account_id`),
-  KEY `char_id` (`char_id`)
+  KEY `account_id` (`account_id`)
 ) ENGINE=MyISAM;
 
 --
@@ -310,8 +307,7 @@ CREATE TABLE IF NOT EXISTS `guild_position` (
   `name` varchar(24) NOT NULL default '',
   `mode` tinyint(11) unsigned NOT NULL default '0',
   `exp_mode` tinyint(11) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`guild_id`,`position`),
-  KEY `guild_id` (`guild_id`)
+  PRIMARY KEY  (`guild_id`,`position`)
 ) ENGINE=MyISAM;
 
 --
@@ -622,8 +618,7 @@ CREATE TABLE IF NOT EXISTS `skill` (
   `char_id` int(11) unsigned NOT NULL default '0',
   `id` smallint(11) unsigned NOT NULL default '0',
   `lv` tinyint(4) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`char_id`,`id`),
-  KEY `char_id` (`char_id`)
+  PRIMARY KEY  (`char_id`,`id`)
 ) ENGINE=MyISAM;
 
 --
@@ -634,8 +629,7 @@ CREATE TABLE IF NOT EXISTS `skill_homunculus` (
   `homun_id` int(11) NOT NULL,
   `id` int(11) NOT NULL,
   `lv` smallint(6) NOT NULL,
-  PRIMARY KEY  (`homun_id`,`id`),
-  KEY `homun_id` (`homun_id`)
+  PRIMARY KEY  (`homun_id`,`id`)
 ) ENGINE=MyISAM;
 
 --
-- 
cgit v1.2.3-60-g2f50

