Improve performance of Topic load - ORDER BY RANDOM

I can see why created_at is needed there, its the query that is trying to find new topics it takes into account a “start date”.

Added the index and can confirm perf is way better:

https://github.com/discourse/discourse/commit/20bee937b70e04aa5afb09635b8aa85866dee588

Thanks for your help here @DeanMarkTaylor !!! closing this for now I feel it has been fully addressed :slight_smile:

5 Likes