A platform for community discussion. Free, open, simple.
PERF: Improve query speed when looking up direct PMs
OsamaSayeghf364317625ee
diff --git a/lib/search.rb b/lib/search.rbindex a109f48a026..9fcd1b76e7b 100644--- a/lib/search.rb+++ b/lib/search.rb@@ -278,7 +278,6 @@ class SearchON tau2.topic_id = tau.topic_idAND tau2.id != tau.idWHERE tau.user_id = :user_id- AND tau.topic_id = posts.topic_idGROUP BY tau.topic_idHAVING COUNT(*) = 1)