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
perf: optimize the performance of accessory query #19557
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #19557 +/- ##
==========================================
- Coverage 45.38% 45.23% -0.16%
==========================================
Files 244 244
Lines 13323 13323
Branches 2719 2719
==========================================
- Hits 6046 6026 -20
- Misses 6974 6995 +21
+ Partials 303 302 -1
Flags with carried forward coverage won't be shown. Click here to find out more. |
1. Add db index for subject_artifact_id in table artifact_accessory. 2. Optimize the SQL of excluding the accessory for artifact count. Signed-off-by: chlins <chenyuzh@vmware.com>
@@ -97,7 +97,6 @@ require ( | |||
github.com/davecgh/go-spew v1.1.1 // indirect | |||
github.com/denverdino/aliyungo v0.0.0-20191227032621-df38c6fa730c // indirect | |||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect | |||
github.com/distribution/reference v0.5.0 // indirect |
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.
Why would this be removed? Is it not used indeed?
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.
We should not need this package, automatically removed after runninggo mod tidy
.
f80e6be
to
9446ce3
Compare
1. Add db index for subject_artifact_id in table artifact_accessory. 2. Optimize the SQL of excluding the accessory for artifact count. Signed-off-by: chlins <chenyuzh@vmware.com> Signed-off-by: wang yan <wangyan@vmware.com>
1. Add db index for subject_artifact_id in table artifact_accessory. 2. Optimize the SQL of excluding the accessory for artifact count. Signed-off-by: chlins <chenyuzh@vmware.com> Signed-off-by: Altynbaev Dinislam <altynbayevdr@sberautotech.ru>
Thank you for contributing to Harbor!
Comprehensive Summary of your change
Issue being fixed
Fixes #(issue)
Please indicate you've done the following: