Skip to content

Commit

Permalink
Add missing indexes according slow queries section in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed May 30, 2016
1 parent 7eaabd2 commit d2de9b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/Migrations/Schema/V111/Version111.php
Expand Up @@ -264,6 +264,8 @@ public function up(Schema $schema)
$this->addSql("INSERT INTO settings_options (variable, value, display_text) VALUES ('ticket_allow_category_edition', 'true', 'Yes'), ('ticket_allow_category_edition', 'false', 'No')");

$this->addSql("ALTER TABLE c_quiz_question_rel_category ADD INDEX idx_qqrc_qid (question_id)");
$this->addSql("ALTER TABLE c_quiz_answer ADD INDEX idx_cqa_q (question_id)");
$this->addSql("ALTER TABLE c_student_publication ADD INDEX idx_csp_u (user_id)");
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/Chamilo/CourseBundle/Entity/CQuizAnswer.php
Expand Up @@ -11,7 +11,8 @@
* @ORM\Table(
* name="c_quiz_answer",
* indexes={
* @ORM\Index(name="c_id", columns={"c_id"})
* @ORM\Index(name="c_id", columns={"c_id"}),
* @ORM\Index(name="idx_cqa_q", columns={"question_id"})
* }
* )
* @ORM\Entity
Expand Down
3 changes: 2 additions & 1 deletion src/Chamilo/CourseBundle/Entity/CStudentPublication.php
Expand Up @@ -12,7 +12,8 @@
* name="c_student_publication",
* indexes={
* @ORM\Index(name="course", columns={"c_id"}),
* @ORM\Index(name="session_id", columns={"session_id"})
* @ORM\Index(name="session_id", columns={"session_id"}),
* @ORM\Index(name="idx_csp_u", columns={"user_id"})
* }
* )
* @ORM\Entity
Expand Down

0 comments on commit d2de9b9

Please sign in to comment.