Index: branches/RC/core/install/install_schema.sql
===================================================================
diff -u -r10294 -r10316
--- branches/RC/core/install/install_schema.sql	(.../install_schema.sql)	(revision 10294)
+++ branches/RC/core/install/install_schema.sql	(.../install_schema.sql)	(revision 10316)
@@ -33,7 +33,11 @@
   OnGeneralTab tinyint(4) NOT NULL default '0',
   IsSystem tinyint(3) unsigned NOT NULL default '0',
   PRIMARY KEY  (CustomFieldId),
-  KEY Type (Type)
+  KEY Type (Type),
+  KEY MultiLingual (MultiLingual),
+  KEY DisplayOrder (DisplayOrder),
+  KEY OnGeneralTab (OnGeneralTab),
+  KEY IsSystem (IsSystem)
 );
 
 CREATE TABLE ConfigurationAdmin (
@@ -46,7 +50,10 @@
   DisplayOrder double NOT NULL default '0',
   GroupDisplayOrder double NOT NULL default '0',
   Install int(11) NOT NULL default '1',
-  PRIMARY KEY  (VariableName)
+  PRIMARY KEY  (VariableName),
+  KEY DisplayOrder (DisplayOrder),
+  KEY GroupDisplayOrder (GroupDisplayOrder),
+  KEY Install (Install)
 );
 
 CREATE TABLE ConfigurationValues (
@@ -86,6 +93,8 @@
 CREATE TABLE EmailSubscribers (
   EmailMessageId int(11) NOT NULL default '0',
   PortalUserId int(11) NOT NULL default '0'
+  KEY EmailMessageId (EmailMessageId),
+  KEY PortalUserId (PortalUserId)
 );
 
 CREATE TABLE Events (
@@ -97,7 +106,9 @@
   Module varchar(40) NOT NULL default '',
   Description varchar(255) NOT NULL default '',
   Type int(11) NOT NULL default '0',
-  PRIMARY KEY  (EventId)
+  PRIMARY KEY  (EventId),
+  KEY Type (Type),
+  KEY Enabled (Enabled)
 );
 
 CREATE TABLE IdGenerator (
@@ -122,6 +133,10 @@
   `Charset` varchar(20) NOT NULL default '',
   UnitSystem tinyint(4) NOT NULL default '1',
   PRIMARY KEY  (LanguageId)
+  KEY Enabled (Enabled),
+  KEY PrimaryLang (PrimaryLang),
+  KEY AdminInterfaceLang (AdminInterfaceLang),
+  KEY Priority (Priority)
 );
 
 CREATE TABLE Modules (
@@ -134,7 +149,9 @@
   TemplatePath varchar(255) NOT NULL default '',
   RootCat int(11) NOT NULL default '0',
   BuildDate int(10) unsigned default NULL,
-  PRIMARY KEY  (`Name`)
+  PRIMARY KEY  (`Name`),
+  KEY Loaded (Loaded),
+  KEY LoadOrder (LoadOrder)
 );
 
 CREATE TABLE PersistantSessionData (
@@ -144,7 +161,9 @@
   VariableValue text NOT NULL,
   PRIMARY KEY  (VariableId),
   KEY UserId (PortalUserId),
-  KEY VariableName (VariableName)
+  KEY VariableName (VariableName),
+  KEY VariableName (Loaded),
+  KEY VariableName (LoadOrder)
 );
 
 CREATE TABLE Phrase (
@@ -168,7 +187,10 @@
   ThemeId int(11) NOT NULL default '0',
   StylesheetId int(10) unsigned NOT NULL default '0',
   ConfigVariables text,
-  PRIMARY KEY  (Template)
+  PRIMARY KEY  (Template),
+  KEY CacheDate (CacheDate),
+  KEY ThemeId (ThemeId),
+  KEY StylesheetId (StylesheetId)
 );
 
 CREATE TABLE PortalGroup (
@@ -184,7 +206,8 @@
   UNIQUE KEY Name (Name),
   UNIQUE KEY ResourceId (ResourceId),
   KEY Personal (Personal),
-  KEY Enabled (Enabled)
+  KEY Enabled (Enabled),
+  KEY CreatedOn (CreatedOn)
 );
 
 CREATE TABLE PortalUser (
@@ -218,7 +241,10 @@
   PRIMARY KEY  (PortalUserId),
   UNIQUE KEY ResourceId (ResourceId),
   UNIQUE KEY Login (Login),
-  KEY CreatedOn (CreatedOn)
+  KEY CreatedOn (CreatedOn),
+  KEY Status (Status),
+  KEY Modified (Modified),
+  KEY IsBanned (IsBanned)
 );
 
 CREATE TABLE PortalUserCustomData (
@@ -245,7 +271,10 @@
   PrimaryTheme int(11) NOT NULL default '0',
   CacheTimeout int(11) NOT NULL default '0',
   StylesheetId int(10) unsigned NOT NULL default '0',
-  PRIMARY KEY  (ThemeId)
+  PRIMARY KEY  (ThemeId),
+  KEY Enabled (Enabled),
+  KEY StylesheetId (StylesheetId),
+  KEY PrimaryTheme (PrimaryTheme)
 );
 
 CREATE TABLE ThemeFiles (
@@ -271,7 +300,9 @@
   ExpirationReminderSent tinyint(4) NOT NULL default '0',
   PRIMARY KEY  (PortalUserId,GroupId),
   KEY GroupId (GroupId),
-  KEY PrimaryGroup (PrimaryGroup)
+  KEY PrimaryGroup (PrimaryGroup),
+  KEY MembershipExpires (MembershipExpires),
+  KEY ExpirationReminderSent (ExpirationReminderSent)
 );
 
 CREATE TABLE UserSession (
@@ -300,7 +331,8 @@
   `timestamp` bigint(20) default '0',
   event varchar(100) default NULL,
   EventParams text NOT NULL,
-  PRIMARY KEY  (EmailLogId)
+  PRIMARY KEY  (EmailLogId),
+  KEY `timestamp` (`timestamp`)
 );
 
 CREATE TABLE Cache (
@@ -319,7 +351,9 @@
   DestName varchar(255) NOT NULL default '',
   DestAbbr char(3) NOT NULL default '',
   DestAbbr2 char(2) default NULL,
-  PRIMARY KEY  (DestId)
+  PRIMARY KEY  (DestId),
+  KEY DestType (DestType),
+  KEY DestParentId (DestParentId)
 );
 
 CREATE TABLE Category (
@@ -386,7 +420,10 @@
   KEY l5_Description (l5_Description(5)),
   KEY TreeLeft (TreeLeft),
   KEY TreeRight (TreeRight),
-  KEY SymLinkCategoryId (SymLinkCategoryId)
+  KEY SymLinkCategoryId (SymLinkCategoryId),
+  KEY Status (Status),
+  KEY CreatedOn (CreatedOn),
+  KEY EditorsPick (EditorsPick)
 );
 
 CREATE TABLE CategoryCustomData (
@@ -425,7 +462,9 @@
   AdvancedCSS text NOT NULL,
   LastCompiled int(10) unsigned NOT NULL default '0',
   Enabled int(11) NOT NULL default '0',
-  PRIMARY KEY  (StylesheetId)
+  PRIMARY KEY  (StylesheetId),
+  KEY Enabled (Enabled),
+  KEY LastCompiled (LastCompiled)
 );
 
 CREATE TABLE PopupSizes (
@@ -447,7 +486,10 @@
   IsClone tinyint(3) unsigned NOT NULL default '0',
   TablesAffected text,
   PRIMARY KEY  (CounterId),
-  UNIQUE KEY Name (Name)
+  UNIQUE KEY Name (Name),
+  KEY IsClone (IsClone),
+  KEY LifeTime (LifeTime),
+  KEY LastCounted (LastCounted)
 );
 
 CREATE TABLE Skins (
@@ -458,7 +500,9 @@
   `Options` text,
   `LastCompiled` int(11) NOT NULL default '0',
   `IsPrimary` int(1) NOT NULL default '0',
-  PRIMARY KEY  (`SkinId`)
+  PRIMARY KEY  (`SkinId`),
+  KEY IsPrimary (IsPrimary),
+  KEY LastCompiled (LastCompiled)
 );
 
 CREATE TABLE ChangeLogs (
@@ -492,5 +536,6 @@
   AffectedItems int(11) NOT NULL default '0',
   PRIMARY KEY  (SessionLogId),
   KEY SessionId (SessionId),
-  KEY `Status` (`Status`)
+  KEY `Status` (`Status`),
+  KEY PortalUserId (PortalUserId)
 );
