From ac26b964663405521077c7710212a58c37a041c7 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 25 Mar 2008 19:08:19 +0000
Subject: Optimize database schema; get rid of unnecessary indexes

---
 SQL/mysql.initial.sql | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

(limited to 'SQL/mysql.initial.sql')

diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index 926a83eab..ae195e438 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -1,5 +1,5 @@
 -- RoundCube Webmail initial database structure
--- Version 0.1-rc1
+-- Version 0.1
 -- 
 
 -- --------------------------------------------------------
@@ -16,9 +16,7 @@ CREATE TABLE `cache` (
   `created` datetime NOT NULL default '0000-00-00 00:00:00',
   `data` longtext NOT NULL,
   PRIMARY KEY  (`cache_id`),
-  KEY `user_id` (`user_id`),
-  KEY `cache_key` (`cache_key`),
-  KEY `session_id` (`session_id`)
+  INDEX `user_cache_index` (`user_id`,`cache_key`)
 );
 
 -- --------------------------------------------------------
@@ -118,10 +116,7 @@ CREATE TABLE `messages` (
   `size` int(11) unsigned NOT NULL default '0',
   `headers` text NOT NULL,
   `structure` text,
-  PRIMARY KEY  (`message_id`),
-  KEY `user_id` (`user_id`),
-  KEY `idx` (`idx`),
-  KEY `uid` (`uid`),
+  PRIMARY KEY (`message_id`),
   UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`)
 );
 
-- 
cgit v1.2.3

