osTicket/osTicket-1.8 — pull request #1439 by torohill (2014-10-29 03:37:58+00:00)
Title: Optimise thread load query.

Modify the query in `Thread->load()` to use sub-selects so that it's faster for tickets with a large number of attachments, messages and responses. Tested on MySQL 5.0.51 and 5.5.40.