Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Improve the performance of fetching event reports over the admin API when there are many of them and the requester has paginated far down the list. #16620

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

reivilibre
Copy link
Contributor

@reivilibre reivilibre commented Nov 10, 2023

Partial fix to #16619

General idea: defer the join to events until after the offset has been applied. It's hard to get an unbiased measurement for this, but the old query took ~3s and the new query took ~500ms for a given query (identical results).

It'd be nicer to add proper indices and defer the other join too (and even change the pagination scheme to not use OFFSET), but this is all I had for a drive-by improvement.

Base: develop

Original commit schedule, with full messages:

  1. Improve performance of fetching event reports when there are many of them

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
@DMRobertson
Copy link
Contributor

What do the query plans look like before and after, OOI?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants