Commit f69fb12
committed
Improve user in_guild sync query time by only loading the id column
This means the other, larger, columns do not need to be deserialised, bringing the query time down from 7.4s down to 3.5s.
I couldn't simply do select(models.User.id) here, as we need the full User object in order to mutate and update it later inthe process.1 parent 7898288 commit f69fb12
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
0 commit comments