OTRS/otrs — pull request #125 by moritz (2013-09-16 09:27:21+00:00)
Title: Avoid pathologically slow query on mysql 5.1

With the old SQL, mysql 5.1 uses the index for create_time, which basically
causes a full table scan. (The query optimizer in mysql 5.5. does better
though).

With the new sql, the index for ticket_id is used instead, which is much
faster.