Index: branches/RC/admin/install/inportal_schema.sql
===================================================================
diff -u -r9598 -r10316
--- branches/RC/admin/install/inportal_schema.sql	(.../inportal_schema.sql)	(revision 9598)
+++ branches/RC/admin/install/inportal_schema.sql	(.../inportal_schema.sql)	(revision 10316)
@@ -8,7 +8,10 @@
   Priority int(11) NOT NULL default '0',
   Status tinyint(4) NOT NULL default '1',
   ErrorTag varchar(255) default NULL,
-  PRIMARY KEY  (RuleId)
+  PRIMARY KEY  (RuleId),
+  KEY Status (Status),
+  KEY Priority (Priority),
+  KEY ItemType (ItemType)
 )
 
 # --------------------------------------------------------
@@ -33,7 +36,9 @@
   ItemTypeId int(11) NOT NULL default '0',
   Modified int(11) NOT NULL default '0',
   PRIMARY KEY  (FavoriteId),
-  UNIQUE KEY main (PortalUserId,ResourceId)
+  UNIQUE KEY main (PortalUserId,ResourceId),
+  KEY Modified (Modified),
+  KEY ItemTypeId (ItemTypeId)
 )
 
 # --------------------------------------------------------
@@ -55,7 +60,9 @@
   LocalThumb tinyint(4) NOT NULL default '1',
   SameImages tinyint(4) NOT NULL default '1',
   PRIMARY KEY  (ImageId),
-  KEY ResourceId (ResourceId)
+  KEY ResourceId (ResourceId),
+  KEY Enabled (Enabled),
+  KEY Priority (Priority)
 )
 
 # --------------------------------------------------------
@@ -66,7 +73,10 @@
   CreatedOn INT UNSIGNED NULL DEFAULT NULL,
   RatingValue int(11) NOT NULL default '0',
   ItemId int(11) NOT NULL default '0',
-  PRIMARY KEY  (RatingId)
+  PRIMARY KEY  (RatingId),
+  KEY CreatedOn (CreatedOn),
+  KEY ItemId (ItemId),
+  KEY RatingValue (RatingValue)
 )
 
 # --------------------------------------------------------
@@ -85,6 +95,11 @@
   TextFormat int(11) NOT NULL default '0',
   Module varchar(255) NOT NULL default '',
   PRIMARY KEY  (ReviewId)
+  KEY CreatedOn (CreatedOn),
+  KEY ItemId (ItemId),
+  KEY ItemType (ItemType),
+  KEY Priority (Priority),
+  KEY Status (Status)
 )
 
 # --------------------------------------------------------
@@ -120,7 +135,9 @@
   CreatedById int(11) NOT NULL default '-1',
   MimeType varchar(255) NOT NULL default '',
   PRIMARY KEY  (FileId),
-  KEY ResourceId (ResourceId)
+  KEY ResourceId (ResourceId),
+  KEY CreatedOn (CreatedOn),
+  KEY Status (Status)
 )
 
 # --------------------------------------------------------
@@ -136,7 +153,12 @@
   Priority int(11) NOT NULL default '0',
   PRIMARY KEY  (RelationshipId),
   KEY RelSource (SourceId),
-  KEY RelTarget (TargetId)
+  KEY RelTarget (TargetId),
+  KEY `Type` (`Type`),
+  KEY Enabled (Enabled),
+  KEY Priority (Priority),
+  KEY SourceType (SourceType),
+  KEY TargetType (TargetType)
 )
 
 # --------------------------------------------------------
@@ -161,7 +183,12 @@
   ContainsWhere text,
   NotContainsWhere text,
   CustomFieldId int(11) default NULL,
-  PRIMARY KEY  (SearchConfigId)
+  PRIMARY KEY  (SearchConfigId),
+  KEY SimpleSearch (SimpleSearch),
+  KEY AdvancedSearch (AdvancedSearch),
+  KEY DisplayOrder (DisplayOrder),
+  KEY Priority (Priority),
+  KEY CustomFieldId (CustomFieldId)
 )
 
 # --------------------------------------------------------
@@ -171,7 +198,8 @@
   Keyword varchar(255) NOT NULL default '',
   Indices bigint(20) NOT NULL default '0',
   SearchType int(11) NOT NULL default '0',
-  PRIMARY KEY  (SearchLogId)
+  PRIMARY KEY  (SearchLogId),
+  KEY SearchType (SearchType)
 )
 
 # --------------------------------------------------------
@@ -188,7 +216,10 @@
   IPaddress varchar(20) NOT NULL default '',
   Expire INT UNSIGNED NULL DEFAULT NULL,
   PortalUserId int(11) NOT NULL default '0',
-  DataType varchar(20) default NULL
+  DataType varchar(20) default NULL,
+  KEY PortalUserId (PortalUserId),
+  KEY Expire (Expire),
+  KEY ItemResourceId (ItemResourceId)
 )
 
 # --------------------------------------------------------
@@ -201,15 +232,18 @@
   ListLabel varchar(255) NOT NULL default '',
   Priority int(11) NOT NULL default '0',
   AdminSummary int(11) NOT NULL default '0',
-  PRIMARY KEY  (StatItemId)
+  PRIMARY KEY  (StatItemId),
+  KEY AdminSummary (AdminSummary),
+  KEY Priority (Priority)
 )
 
 # --------------------------------------------------------
 
 CREATE TABLE SuggestMail (
   email varchar(255) NOT NULL default '',
   sent INT UNSIGNED NULL DEFAULT NULL,
-  PRIMARY KEY  (email)
+  PRIMARY KEY  (email),
+  KEY sent (sent)
 )
 
 # --------------------------------------------------------
@@ -247,7 +281,8 @@
   DefValue varchar(255) default NULL,
   Description TEXT,
   Required int(11) NOT NULL default '0',
-  PRIMARY KEY  (AttrId)
+  PRIMARY KEY  (AttrId),
+  KEY TagId (TagId)
 )
 
 # --------------------------------------------------------
@@ -262,7 +297,8 @@
   is_requred_fields varchar(255) NOT NULL default '',
   is_enabled tinyint(1) unsigned NOT NULL default '0',
   is_type varchar(10) NOT NULL default '',
-  PRIMARY KEY  (is_id)
+  PRIMARY KEY  (is_id),
+  KEY is_enabled (is_enabled)
 )
 
 # --------------------------------------------------------
@@ -277,7 +313,10 @@
   Type tinyint(4) NOT NULL default '0',
   AdvancedCSS text NOT NULL,
   ParentId int(11) NOT NULL default '0',
-  PRIMARY KEY  (SelectorId)
+  PRIMARY KEY  (SelectorId),
+  KEY StylesheetId (StylesheetId),
+  KEY ParentId (ParentId),
+  KEY `Type` (`Type`)
 )
 
 # --------------------------------------------------------
@@ -291,7 +330,8 @@
   PortalUserId int(11) NOT NULL default '-2',
   PRIMARY KEY  (VisitId),
   KEY PortalUserId (PortalUserId),
-  KEY AffiliateId (AffiliateId)
+  KEY AffiliateId (AffiliateId),
+  KEY VisitDate (VisitDate)
 )
 
 # --------------------------------------------------------
