KAPx/moodle-local_ltiprovider — pull request #13 by Trii (2014-07-08 18:32:34+00:00)
Title: Add an index to contextid in order for the query below not to suck

```sql
SELECT c.id courseId , c.fullname courseName , cm.id
courseModuleId , ctx.id contextId , m.name moduleName FROM mdl_course c
JOIN mdl_course_modules cm ON (c.id = cm.course) JOIN mdl_modules m ON
(cm.module = m.id) JOIN josh_context ctx ON (cm.id = ctx.instanceid)
LEFT JOIN josh_local_ltiprovider l ON (ctx.id = l.contextid) WHERE l.id
IS NULL AND ctx.contextlevel = 70 ORDER BY c.id DESC
```