mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-04 15:13:41 +08:00
Using CTEs and DISTINCT ON to: - Pre-filter active users with correct preferences - Get only first unread message per channel - Eliminate redundant joins and message scanning This reduces the query execution time by limiting message scanning and joins to only relevant users and messages. Internal ref t/142836 & t/139517 |
||
|---|---|---|
| .. | ||
| chat | ||
| chat_sdk | ||
| discourse_dev | ||
| email_controller_helper | ||
| onebox/templates | ||
| tasks | ||