Whats faster, sorting in Database or PHP?


Well-known member
The Watched Threads query is quite slow with more than 0.05 seconds on my test installation. When I remove sorting, it is noticeably faster. It is even more faster when you don't set any limit. Do you skip sorting and limit in the database and delegate these tasks to php by purpose?


Well-known member
I prefer the query because the code to sort would be repeated constantly and could get quite convoluted if improper. It is also extra coding I see no need for.

As for the limit, that's almost a necessity if you want your forum to function well.