summary refs log tree commit diff
path: root/changelog.d/14409.bugfix
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2022-11-10 19:02:27 +0000
committerGitHub <noreply@github.com>2022-11-10 19:02:27 +0000
commitb2c2b030798d0e74d3bf1afb4726465b53620638 (patch)
treea93ecc29c3af6b3b701dfa36206a4e34b384c04c /changelog.d/14409.bugfix
parentQuieter logging for stateres failure at missing prev events (#14346) (diff)
downloadsynapse-b2c2b030798d0e74d3bf1afb4726465b53620638.tar.xz
Fix PostgreSQL sometimes using table scans for `event_search` (#14409)
PostgreSQL may underestimate the number of distinct `room_id`s in
`event_search`, which can cause it to use table scans for queries for
multiple rooms.

Fix this by setting `n_distinct` on the column.

Resolves #14402.

Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to 'changelog.d/14409.bugfix')
-rw-r--r--changelog.d/14409.bugfix1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/14409.bugfix b/changelog.d/14409.bugfix
new file mode 100644
index 0000000000..f720700653
--- /dev/null
+++ b/changelog.d/14409.bugfix
@@ -0,0 +1 @@
+Fix PostgreSQL sometimes using table scans for queries against the `event_search` table, taking a long time and a large amount of IO.