-
Notifications
You must be signed in to change notification settings - Fork 27
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
Closes #937 Optimise sql query for image counting and statistics #957
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
@Khadreal Do you think adding tests could be beneficial on those queries? |
Yes, Will try to add a test to it. |
@Khadreal Thanks for the PR. here is a test sample result of PR Vs Production |
The filter |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
…t to be more dynamic
=> Quries mentioned https://bmdo-my.sharepoint.com/:x:/r/personal/mai_saad_group_one/_layouts/15/Doc.aspx?sourcedoc=%7B83BAA867-DABE-49C1-ABBA-E2280AB91751%7D&file=imagify%20measurements.xlsx&action=default&mobileredirect=true&DefaultItemOpen=1&ct=1737700216466&wdOrigin=OFFICECOM-WEB.MAIN.REC&cid=f7eeb5e6-4928-408d-854f-1bf7870c551e&wdPreviousSessionSrc=HarmonyWeb&wdPreviousSession=50d0eacb-affe-42bc-b8cd-32bb662a4e01 are better now (some values are slightly bigger on PR but measurements can vary each time doing same steps) |
Working as expected.
|
Description
Optimise SQL query for image counting.
Fixes #937
Type of change
Detailed scenario
Check #937
Technical description
Documentation
Modify existing query to be faster and rewrite
imagify_has_attachments_without_required_metadata
sql to be more optimised.Changed from using
left join
toExists
Mandatory Checklist
Code validation
Code style
Unticked items justification
If some mandatory items are not relevant, explain why in this section.
Additional Checks