From 20e24878adebd0dc286b93cc4ab5023f00f0bd52 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 7 Aug 2012 15:44:55 +0200 Subject: [PATCH] Adding indexes in course lp_item/lp_item_view tables . Changes are commented by now waiting for 1.10 see BT#4701 --- main/inc/lib/add_course.lib.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main/inc/lib/add_course.lib.inc.php b/main/inc/lib/add_course.lib.inc.php index d1638ad350..f63ed99042 100644 --- a/main/inc/lib/add_course.lib.inc.php +++ b/main/inc/lib/add_course.lib.inc.php @@ -1410,7 +1410,10 @@ function create_course_tables($course_db_name = null) { $sql = "ALTER TABLE `$TABLELPITEM` ADD INDEX (lp_id)"; Database::query($sql); - + + /*$sql = "ALTER TABLE $TABLELPITEM ADD INDEX idx_c_lp_item_cid_lp_id (c_id, lp_id)"; + Database::query($sql);*/ + $sql = "CREATE TABLE IF NOT EXISTS `$TABLELPITEMVIEW` ( $add_to_all_tables " . @@ -1436,7 +1439,11 @@ function create_course_tables($course_db_name = null) { $sql = "ALTER TABLE `$TABLELPITEMVIEW` ADD INDEX (lp_view_id) "; Database::query($sql); - + + /*$sql = "ALTER TABLE $TABLELPITEMVIEW ADD INDEX idx_c_lp_item_view_cid_lp_view_id_lp_item_id (c_id, lp_view_id, lp_item_id) "; + Database::query($sql);*/ + + $sql = "CREATE TABLE IF NOT EXISTS `$TABLELPIVINTERACTION`( $add_to_all_tables" . "id bigint unsigned auto_increment," .