diff options
author | Erik Johnston <erik@matrix.org> | 2021-07-15 16:02:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 16:02:12 +0100 |
commit | 3acf85c85f62655077f8c4b466389de4a4183604 (patch) | |
tree | beae5e7d0633a3c19ad0f3a970d138723b68f47f /changelog.d | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-3acf85c85f62655077f8c4b466389de4a4183604.tar.xz |
Reduce likelihood of Postgres table scanning `state_groups_state`. (#10359)
The postgres statistics collector sometimes massively underestimates the number of distinct state groups are in the `state_groups_state`, which can cause postgres to use table scans for queries for multiple state groups. We fix this by manually setting `n_distinct` on the column.
Diffstat (limited to 'changelog.d')
-rw-r--r-- | changelog.d/10359.bugfix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/10359.bugfix b/changelog.d/10359.bugfix new file mode 100644 index 0000000000..d318f8fa08 --- /dev/null +++ b/changelog.d/10359.bugfix @@ -0,0 +1 @@ +Fix PostgreSQL sometimes using table scans for queries against `state_groups_state` table, taking a long time and a large amount of IO. |