Significant speed improvement to the paginatedTicketQuery