From 3a5476d150419b46847dd922935f368c969519c1 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Wed, 23 Feb 2011 03:13:02 -0500 Subject: [PATCH] - Add index on contactgroupmembers.contact_id column. Improves performance and fixes problem with contactgroupmembers table creation on MySQL 4.x --- SQL/sqlite.initial.sql | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SQL/sqlite.initial.sql b/SQL/sqlite.initial.sql index ea7650c..d2885e9 100644 --- a/SQL/sqlite.initial.sql +++ b/SQL/sqlite.initial.sql @@ -28,10 +28,11 @@ changed datetime NOT NULL default '0000-00-00 00:00:00', del tinyint NOT NULL default '0', name varchar(128) NOT NULL default '', - email varchar(128) NOT NULL default '', + email varchar(255) NOT NULL default '', firstname varchar(128) NOT NULL default '', surname varchar(128) NOT NULL default '', - vcard text NOT NULL default '' + vcard text NOT NULL default '', + words text NOT NULL default '' ); CREATE INDEX ix_contacts_user_id ON contacts(user_id, email); @@ -55,6 +56,8 @@ PRIMARY KEY (contactgroup_id, contact_id) ); +CREATE INDEX ix_contactgroupmembers_contact_id ON contactgroupmembers (contact_id); + -- -------------------------------------------------------- -- Gitblit v1.9.1