Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve master_commit_red query performance (#6174)
Pre filter the commits so we can filter the workflow job and workflow run tables on it later This improves speed for all time ranges up to 1 year. I did not check beyond that I believe the memory used is about the same, but it scans more rows for some reason This is the query behind this chart <img width="1266" alt="image" src="https://github.com/user-attachments/assets/e00c18dc-a87a-4648-99cd-9c35295baabf" /> on the metrics page Tentative wins, sample size 3 ``` +------+----------+-----------+-------------+---------------+--------------+---------------+----------------+--------------+ | Test | Avg Time | Base Time | Time Change | % Time Change | Avg Mem | Base Mem | Mem Change | % Mem Change | +------+----------+-----------+-------------+---------------+--------------+---------------+----------------+--------------+ | 0 | 1163 | 23117 | -21954 | -95 | 157241294.6 | 1539051189.75 | -1381809895.15 | -90 | | 1 | 1281 | 14509 | -13228 | -91 | 350569557 | 1585082143.8 | -1234512586.8 | -78 | | 2 | 8704 | 22954 | -14250 | -62 | 1774302065.6 | 3929546293 | -2155244227.4 | -55 | +------+----------+-----------+-------------+---------------+--------------+---------------+----------------+--------------+ ```
- Loading branch information