Skip to content
Browse files

Add indexes for gradebook tables in optimization guide

  • Loading branch information...
ywarnier committed Dec 18, 2018
1 parent db5cdaa commit d2e4aa42a77eb920151042007ae6dacb3d1879a8
Showing with 3 additions and 0 deletions.
  1. +3 −0 documentation/optimization.html
@@ -208,6 +208,9 @@ <h2><a name="2.Slow-queries"></a>2. Slow queries</h2>
If you have lots of gradebook stuff, add this
ALTER TABLE gradebook_result ADD INDEX idx_gb_uid_eid (user_id, evaluation_id);
ALTER TABLE gradebook_category ADD INDEX idx_gb_cat_parent (parent_id);
ALTER TABLE gradebook_evaluation ADD INDEX idx_ge_cat (category_id);
ALTER TABLE gradebook_link ADD INDEX idx_gl_cat (category_id);
If you have to delete a lot of users, you'll realize deleting users is a slow operation.
Using the following queries might help:

0 comments on commit d2e4aa4

Please sign in to comment.
You can’t perform that action at this time.