This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Manually set n_distinct
for event_search.room_id
to avoid bad Postgres query plans
#14402
Labels
A-Message-Search
Searching messages
O-Frequent
Affects or can be seen by most users regularly or impacts most users' first experience
S-Major
Major functionality / product severely impaired, no satisfactory workaround.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
On matrix.org we discovered that every now and again
event_search
queries would take forever due to using the wrong query plan. This was due to Postgres underestimating the number of room IDs that existed.To fix this we should add a schema update with:
like we do for
state_groups_state.state_group
already.The text was updated successfully, but these errors were encountered: