Skip to content

Alter message query to leverage index#628

Merged
jchristgit merged 1 commit into
mainfrom
alter-query-to-leverage-index
Nov 24, 2021
Merged

Alter message query to leverage index#628
jchristgit merged 1 commit into
mainfrom
alter-query-to-leverage-index

Conversation

@ChrisLovering
Copy link
Copy Markdown
Member

Previously this query would convert each row to an array just to check if it matched or not. By changing EXCLUDE_CHANNELS to a tuple instead of a list, it doesn't get passed as an array, so we can do a simple NOT IN check.

This will also allow us to add an index with this condition to speed it up further.

Previously this query would convert each row to an array just to check if it matched or not. By changing EXCLUDE_CHANNELS to a tuple instead of a list, it doesn't get passed as an array, so we can do a simple NOT IN check.

This will also allow us to add an index with this condition to speed it up further.
@ChrisLovering ChrisLovering requested a review from jb3 as a code owner November 23, 2021 16:29
@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 23, 2021

✔️ Deploy Preview for pydis-static ready!

🔨 Explore the source changes: 5b1bb82

🔍 Inspect the deploy log: https://app.netlify.com/sites/pydis-static/deploys/619d16eb4cd8a30008a1d4ce

😎 Browse the preview: https://deploy-preview-628--pydis-static.netlify.app

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 5b1bb82 on alter-query-to-leverage-index into d1a051e on main.

Copy link
Copy Markdown
Contributor

@Akarys42 Akarys42 left a comment

Choose a reason for hiding this comment

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

Let's squeeze that speed fruit. Should it be merged yet?

@ChrisLovering
Copy link
Copy Markdown
Member Author

ChrisLovering commented Nov 23, 2021

Let's squeeze that speed fruit. Should it be merged yet?

yup, it's good to be merged. I've already created the index in the db while perf testing

@jchristgit jchristgit merged commit 18d2ea2 into main Nov 24, 2021
@jchristgit jchristgit deleted the alter-query-to-leverage-index branch November 24, 2021 12:14
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.

4 participants