Sort messages by ids to avoid the left join....
Sort messages by ids to avoid the left join.
The query was really slow with PostgreSQL and a few thousands messages, and last_message_id column was storing the highest id anyway.
git-svn-id:
http://svn.redmine.org/redmine/trunk@15582 e93f8b46-1217-0410-a6f0-8f06a7374b81