# Improve performance of Topic load - ORDER BY RANDOM

**URL:** https://meta.discourse.org/t/improve-performance-of-topic-load-order-by-random/25619
**Category:** Bug
**Tags:** slow-sql
**Created:** [February 24, 2015, 4:48pm UTC](https://meta.discourse.org/t/improve-performance-of-topic-load-order-by-random/25619 "2015-02-24T16:48:29Z")
**Posts on this page:** 1
**Showing post:** 23

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 1, 2015, 10:52pm UTC](https://meta.discourse.org/t/improve-performance-of-topic-load-order-by-random/25619/23 "2015-03-01T22:52:10Z")

</div>

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](https://github.com/discourse/discourse/commit/20bee937b70e04aa5afb09635b8aa85866dee588)

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

---

_[View the full topic](https://meta.discourse.org/t/improve-performance-of-topic-load-order-by-random/25619)._
