matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.13k forks source link

Improve performance of delete device messages query #16492

Closed MatMaul closed 1 year ago

MatMaul commented 1 year ago

cf #16479.

Signed-off-by: Mathieu Velten matmaul@gmail.com

Pull Request Checklist

MatMaul commented 1 year ago

~I am getting less rows deleted with this new query (10 instead of 12), I need to check why.~ All is fine. cf https://github.com/matrix-org/synapse/issues/16479#issuecomment-1763158117 for more infos and PG plans for old and new queries.

MatMaul commented 1 year ago

I think this is fine so undrafting it, but it may be useful to check a plan on pg11 with the new query.