• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Whats faster, sorting in Database or PHP?

Marcus

Well-known member
#1
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?
 

Jeremy

Well-known member
#2
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.