This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Fix the SQL SELECT query in _paginate_room_events_txn#6340
Merged
babolivier merged 6 commits intodevelopfrom Nov 8, 2019
Merged
Fix the SQL SELECT query in _paginate_room_events_txn#6340babolivier merged 6 commits intodevelopfrom
babolivier merged 6 commits intodevelopfrom
Conversation
Doing a SELECT DISTINCT when paginating is quite expensive, because it requires the engine to do sorting on the entire events table. However, we only need to run it if we're filtering on 2+ labels, so this PR is changing the request so that DISTINCT is only used then.
Member
|
fixes #6337? |
5 tasks
Contributor
Author
Ah, yes, I missed the issue |
erikjohnston
approved these changes
Nov 8, 2019
Member
erikjohnston
left a comment
There was a problem hiding this comment.
Let's get this merged to unbreak develop
babolivier
pushed a commit
that referenced
this pull request
Sep 1, 2021
* commit '963ffb60b': Incorporate review Lint Only join on event_labels if we're filtering on labels Handle lack of filter Changelog Fix the SQL SELECT query in _paginate_room_events_txn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Doing a SELECT DISTINCT when paginating is quite expensive, because it requires the engine to do sorting on the entire events table. However, we only need to run it if we're filtering on 2+ labels, so this PR is changing the request so that DISTINCT is only used then.
Fixes #6337