Skip to content
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

Modify get entities query to avoid unnecessary join #872

Merged
merged 21 commits into from
Feb 1, 2022
Merged

Conversation

agusaldasoro
Copy link
Contributor

@agusaldasoro agusaldasoro commented Jan 20, 2022

  • Modified query of getHistoricalDeployments to avoid making a self join to obtain overwrittenBy field, it is only calculated when authChain is requested in: /pointer-changes and /audit/{entityType}/{entityId}
  • Removed deployedBy filter

@@ -16,7 +16,7 @@
"@dcl/archipelago": "1.0.0",
"@dcl/catalyst-api-specs": "1.0.1",
"cors": "2.8.5",
"dcl-catalyst-commons": "7.2.1",
"dcl-catalyst-commons": "tag-7.2.2-include-deployed-by",
Copy link
Contributor

Choose a reason for hiding this comment

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

before merging to main, add the version here

}
function getBaseQuery(includeOverwrittenInfo?: boolean) {
// TODO: make another query for when deleter deployment is needed
if (!!includeOverwrittenInfo) {
Copy link
Contributor

Choose a reason for hiding this comment

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

aren't both queries equal and the only difference the left join?

I think it can be added as are the other clauses

@agusaldasoro agusaldasoro self-assigned this Jan 24, 2022
@agusaldasoro agusaldasoro enabled auto-merge (squash) February 1, 2022 13:57
@agusaldasoro agusaldasoro merged commit 9343911 into main Feb 1, 2022
@agusaldasoro agusaldasoro deleted the change-join branch February 1, 2022 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants