Skip to content
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

feat(trollbot): improve query perf #1010

Merged
merged 4 commits into from Sep 2, 2021
Merged

feat(trollbot): improve query perf #1010

merged 4 commits into from Sep 2, 2021

Conversation

ben-pr-p
Copy link
Contributor

@ben-pr-p ben-pr-p commented Sep 2, 2021

Description

This improves the performance of get_trollbot_matches by only running a ts_query for each token if we have already determined that the message matches at least one token for that stemming mode.

Motivation and Context

We think the long running query times of trollbot may have been negative impacting some other queries, particularly delivery report handling.

How Has This Been Tested?

Running the query directly on production - just a select.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Documentation Changes

Checklist:

  • My code follows the code style of this project.
  • My commit messages follow the Conventional Commits specification.
  • My change requires a change to the documentation.
  • I have included updates for the documentation accordingly.

Copy link
Member

@bchrobot bchrobot left a comment

Choose a reason for hiding this comment

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

Update schema-dump.sql

@bchrobot bchrobot merged commit 32e747e into master Sep 2, 2021
@bchrobot bchrobot deleted the feat/trollbot-perf branch September 2, 2021 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants