mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
We query this table when getting composer messages with the queries such as: ``` SELECT 1 AS one FROM "user_histories" WHERE "user_histories"."target_user_id" = 1 AND "user_histories"."action" = 9 AND "user_histories"."topic_id" = 105794 LIMIT 1 ``` This index ensures this query remains very quick, regardless of user history size.