Commit 959f81a
authored
feat: performance tuning credentials admin (#2684)
this adds a single index to UserCredential.credential_id. You would
think this would be implicitly indexed by the presence of a
unique_together, but it isn't. I don't want to get overly exuberant with
indices because we have a lot of costly writes during grading already,
but I can see using SQL `EXPLAIN` that making this change does
convert the django admin page from `using filesort` to `using index`,
so theoretically this should speed it up. If it doesn't, I will try a
different approach.1 parent 5f49ac0 commit 959f81a
File tree
2 files changed
+19
-1
lines changed- credentials/apps/credentials
- migrations
2 files changed
+19
-1
lines changedLines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
0 commit comments