# Private Message Page Performance

**URL:** <https://meta.discourse.org/t/private-message-page-performance/39865>\
**Category:** Development\
**Tags:** slow-sql\
**Created:** [Février 19, 2016, 8:04 UTC](https://meta.discourse.org/t/private-message-page-performance/39865 "2016-02-19T20:04:41Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [Mars 14, 2016, 4:12 UTC](https://meta.discourse.org/t/private-message-page-performance/39865/5 "2016-03-14T16:12:09Z")

</div>

Sam,

It looks like the query is only slow for me!

It’s because the “Welcome to Discourse” messages came from my user, so 30% (112.000) of the rows from `topic_users` are on my user\_id.

For other users, the query is crazy fast!

And after trying many indexes and query modifications it’s really tricky to get good performance.

Maybe lazy loading the suggested topics would be a good way? It would make the topic render faster (3 or so less to wait) and be more forgiving of slowness on suggestions. Of course is a very bigger refactor, but just saving my findings here.

---

_[View the full topic](https://meta.discourse.org/t/private-message-page-performance/39865)._
