mirror of
https://github.com/ansible/awx.git
synced 2026-02-03 10:38:15 -03:30
When on the screen in the UI that loads the job events, the ui includes a filter to exclude job events where stdout = ''. Because this is a TextField and was not in the allow list, we were applying DISTINCT to the query. This made it very unperformant for large jobs, especially on the query that gets the count and cannot put a LIMIT on the query. Also correctly prefetch the related job_template data on the view to cut down the number of queries we make from around 50 to under 10. We need to analyze other similar views for other prefetch type optimizations we should make.