Skip to content

Prune queries from subscription evaluation #2641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 24, 2025

Conversation

joshua-spacetime
Copy link
Collaborator

@joshua-spacetime joshua-spacetime commented Apr 18, 2025

Description of Changes

This patch parameterizes certain subscription queries and populates a lookup table with their parameter values so that we can potentially prune queries that we know won't match any rows before we evaluate them.

API and ABI breaking changes

None

Expected complexity level and risk

2

This is not a general solution. Rather it is more of a stopgap that improves subscription performance in certain pathological scenarios. As such, I've taken a pretty conservative approach in terms of what queries are parameterized.

Testing

  • Subscription manager internal tests
  • Execution metrics tests
  • Bot test

@joshua-spacetime joshua-spacetime marked this pull request as ready for review April 18, 2025 23:51
@bfops bfops added the release-any To be landed in any release window label Apr 21, 2025
@joshua-spacetime joshua-spacetime requested a review from mamcx April 21, 2025 20:49
@joshua-spacetime joshua-spacetime force-pushed the joshua/perf/subscription-path-pruning branch from aaea2d7 to 915b5b5 Compare April 22, 2025 19:33
Copy link
Contributor

@mamcx mamcx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Only a minor comment

@joshua-spacetime joshua-spacetime force-pushed the joshua/perf/subscription-path-pruning branch from fc31eeb to bacb374 Compare April 23, 2025 16:54
@joshua-spacetime joshua-spacetime force-pushed the joshua/perf/subscription-path-pruning branch from bacb374 to 467ac13 Compare April 23, 2025 23:25
@joshua-spacetime joshua-spacetime added this pull request to the merge queue Apr 23, 2025
@joshua-spacetime joshua-spacetime self-assigned this Apr 24, 2025
@joshua-spacetime joshua-spacetime added release-next and removed release-any To be landed in any release window labels Apr 24, 2025
Merged via the queue into master with commit 2f33924 Apr 24, 2025
19 checks passed
@joshua-spacetime joshua-spacetime deleted the joshua/perf/subscription-path-pruning branch April 24, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants