Commit ed46b9e
committed
Improve performance of fetchDistinctPaymentYearsByUser
This is called from the very niche endpoint /api/transaction/years.
The amount > 0 was intended to only check for payments, but in practice this doesn't matter. We can just return the years of acticity for this userId and show no payments for the years it was not used on paybutton. This dramatically speeds up the query (from ~9s to ~100ms on my machine).1 parent e0dbc87 commit ed46b9e
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
1268 | | - | |
1269 | | - | |
| 1268 | + | |
1270 | 1269 | | |
1271 | 1270 | | |
1272 | 1271 | | |
| |||
0 commit comments