From d58f0e220aaabec5e91f5b45948cab3958ebb34f Mon Sep 17 00:00:00 2001
From: alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>
Date: Mon, 24 Nov 2008 07:59:10 +0000
Subject: - Added index on cache.created + small fixes in mssql DDL script

git-svn-id: https://svn.roundcube.net/trunk@2087 208e9e7b-5314-0410-a742-e7e81cd9613c
---
 roundcubemail/SQL/mssql.initial.sql | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

(limited to 'roundcubemail/SQL/mssql.initial.sql')

diff --git a/roundcubemail/SQL/mssql.initial.sql b/roundcubemail/SQL/mssql.initial.sql
index 162495781..98412de2b 100644
--- a/roundcubemail/SQL/mssql.initial.sql
+++ b/roundcubemail/SQL/mssql.initial.sql
@@ -128,6 +128,9 @@ GO
  CREATE  INDEX [IX_cache_cache_key] ON [dbo].[cache]([cache_key]) ON [PRIMARY]
 GO
 
+ CREATE  INDEX [IX_cache_created] ON [dbo].[cache]([created]) ON [PRIMARY]
+GO
+
 ALTER TABLE [dbo].[contacts] ADD 
 	CONSTRAINT [DF_contacts_user_id] DEFAULT (0) FOR [user_id],
 	CONSTRAINT [DF_contacts_changed] DEFAULT (getdate()) FOR [changed],
@@ -179,10 +182,10 @@ GO
  CREATE  INDEX [IX_messages_cache_key] ON [dbo].[messages]([cache_key]) ON [PRIMARY]
 GO
 
- CREATE  INDEX [IX_messages_idx] ON [dbo].[messages]([idx]) ON [PRIMARY]
+ CREATE  INDEX [IX_messages_uid] ON [dbo].[messages]([uid]) ON [PRIMARY]
 GO
 
- CREATE  INDEX [IX_messages_uid] ON [dbo].[messages]([uid]) ON [PRIMARY]
+ CREATE  INDEX [IX_messages_created] ON [dbo].[messages]([created]) ON [PRIMARY]
 GO
 
 ALTER TABLE [dbo].[session] ADD 
@@ -202,3 +205,9 @@ ALTER TABLE [dbo].[users] ADD
 	CONSTRAINT [DF_users_language] DEFAULT ('en') FOR [language]
 GO
 
+ CREATE  INDEX [IX_users_username] ON [dbo].[users]([username]) ON [PRIMARY]
+GO
+
+ CREATE  INDEX [IX_users_alias] ON [dbo].[users]([alias]) ON [PRIMARY]
+GO
+
-- 
cgit v1.2.3

