-
Notifications
You must be signed in to change notification settings - Fork 2.8k
improve event fetch query #3236
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
improve event fetch query #3236
Conversation
|
Deploy preview for hasura-docs ready! Built with commit d0737a1 |
|
/heroku deploy |
|
Review app for commit ca07436 deployed to Heroku: https://hge-ci-pull-3236.herokuapp.com |
lexi-lambda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally looks good to me, aside from one small comment. Do you think it would be possible to add a benchmark for this? Or would it be a lot of effort?
|
Review app for commit 308bfcf deployed to Heroku: https://hge-ci-pull-3236.herokuapp.com |
|
Review app for commit f6ad1a5 deployed to Heroku: https://hge-ci-pull-3236.herokuapp.com |
f6ad1a5 to
308bfcf
Compare
|
Review app for commit 0be28a5 deployed to Heroku: https://hge-ci-pull-3236.herokuapp.com |
|
@rikinsk I tested this and seems fine. |
|
Review app for commit e0f7e19 deployed to Heroku: https://hge-ci-pull-3236.herokuapp.com |
|
Review app for commit d0737a1 deployed to Heroku: https://hge-ci-pull-3236.herokuapp.com |
|
Review app https://hge-ci-pull-3236.herokuapp.com is deleted |
Description
Improve the fetch new events query for Event Triggers. This should significantly reduce the base line load on PG.
Affected components
Solution and Design
When an event trigger is deleted, set
archived = 't'for all its corresponding events. Instead of joining to find active event triggers (like it happens currently), check for archived.Add index to
deliveredcolumn.Steps to test and verify
Limitations, known bugs & workarounds
It's not clear if the index would help because sometimes postgres prefers seq scan (during experiments), in which case it is just costly to maintain the index.