diff options
author | alecpl <alec@alec.pl> | 2011-02-23 08:13:02 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-02-23 08:13:02 +0000 |
commit | 3a5476d150419b46847dd922935f368c969519c1 (patch) | |
tree | 145ed6817352cb843c1ea7467eed24e81091418f /SQL/mysql.initial.sql | |
parent | 5744bfa54de0baacbf788bc30aacce3cd1089b9c (diff) |
- Add index on contactgroupmembers.contact_id column.
Improves performance and fixes problem with contactgroupmembers table creation on MySQL 4.x
Diffstat (limited to 'SQL/mysql.initial.sql')
-rw-r--r-- | SQL/mysql.initial.sql | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql index accf212d4..8e2e61c9e 100644 --- a/SQL/mysql.initial.sql +++ b/SQL/mysql.initial.sql @@ -117,7 +117,8 @@ CREATE TABLE `contactgroupmembers` ( CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`) REFERENCES `contactgroups`(`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`) - REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE + REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE, + INDEX `contactgroupmembers_contact_index` (`contact_id`) ) /*!40000 ENGINE=INNODB */; |