summaryrefslogtreecommitdiff
path: root/SQL/mssql.initial.sql
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-11-24 07:59:10 +0000
committeralecpl <alec@alec.pl>2008-11-24 07:59:10 +0000
commite4d9f05e4126501ce329fc4c36704375f6dfe681 (patch)
treecb676b255788ddadead29dc86db32a187da5a520 /SQL/mssql.initial.sql
parentae9124d3a92e2fd1d507d9dcba49209463391ad7 (diff)
- Added index on cache.created + small fixes in mssql DDL script
Diffstat (limited to 'SQL/mssql.initial.sql')
-rw-r--r--SQL/mssql.initial.sql13
1 files changed, 11 insertions, 2 deletions
diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql
index 162495781..98412de2b 100644
--- a/SQL/mssql.initial.sql
+++ b/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
+