-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 query performance #17862
improve query performance #17862
Conversation
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.
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.
LGTM: One comment about the lack of test, if not in place it shouldn't be part of this review
@@ -159,32 +159,17 @@ SELECT status, extract(epoch from age(updated_at, created_at)) AS sec FROM jobs | |||
} | |||
|
|||
private long oldestJobAgeSecs(final JobStatus status) { |
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.
NIT/ FAR (For another review): This is not covert by a UTest. Should we write a story to cover those queries on a container DB. That would make those changes much safer.
This reverts commit e0db09b.
* replace WITH query with more performant query * replace multiple ORs with an IN
* Revert "improve query performance (airbytehq#17862)" This reverts commit e0db09b. * Revert "fix metric reporter not producing metrics (airbytehq#17863)" This reverts commit 63e39e6. * Revert "convert airbyte-metrics-reporter to micronaut (airbytehq#17365)" This reverts commit d30de1b.
What
String.format
%s
with a?
bind variableHow
WITH
clause) with simpler queryEXTRACT(EPOCH FROM...)
query