queue: Use nested criteria for the query
This changes the organization of the ticket queue query. It places the criteria of the queue and the access criteria based on the staff in a query by itself. Then it joins to that query and selects the columns and annotations in the outer query. This seems to help MySQL focus on the query in two stages. The first is to find the one page of results to be shown on the page, and the second is to find all the information to be shown for each ticket.
Loading
Please register or sign in to comment