osTicket/osTicket-1.7 — pull request #778 by greezybacon (2013-10-17 14:26:46+00:00)
Title: Reduce cost of deleting orphaned files

Previous explain included a nested sub-select, which exponentially increased the count of the rows to be examined. This patch eliminates one layer of nesting on the sub-select and dramatically increases the performance finding orphaned files.

Fixes #773

References:
http://www.osticket.com/forums/forum/osticket-1-7-latest-release/troubleshooting-and-problems-aa/9446-version-1-7-much-slower-than-1-6