Commit de61cad
authored
Addresses a performance issue on the dashboard. (#738)
* Addresses a performance issue on the dashboard.
Using the MI Date table for this query resulted in a cartesian
explosion. The results where correct, but the query plan was awful, it
ended up doing multiple scans (18,000+) of the participant table.
This tweaked query skips the MI table and just scans the converted date.
This is needed to get the full count, but it is better to do it once
rather than tens of thousands of times.1 parent f8bb361 commit de61cad
1 file changed
Lines changed: 8 additions & 11 deletions
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
27 | 23 | | |
28 | 24 | | |
29 | | - | |
30 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
| |||
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
43 | | - | |
| 40 | + | |
44 | 41 | | |
0 commit comments