-
Notifications
You must be signed in to change notification settings - Fork 62
Performance: /api/content_node/checklist_nodes #7114
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
Conversation
| #[Groups(['read'])] | ||
| #[ORM\ManyToOne(targetEntity: ColumnLayout::class, inversedBy: 'rootDescendants')] | ||
| #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')] // TODO make not null in the DB using a migration, and get fixtures to run | ||
| #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')] |
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.
Nice, so this finally works now
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.
yes - and it improves performance :)
| 'violations' => [ | ||
| [ | ||
| 'propertyPath' => 'parent', | ||
| 'propertyPath' => 'root', |
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.
The test name still says the parent may not be missing, not the root. Should this be a new test instead? Or do we just need to adjust the test's name?
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.
Unfortunately no.
parent is the mandatory field. But without parent root is not determined.
Unfortunately root is checked first.
It is correct that a ValidationError occurs. However, the message is unfortunate.
Unfortunately, I have not found a better solution.
177a351 to
be75ad0
Compare
Add Index
ContentNode->strategyimproves joins with strategy-filter
ContentNode->rootnot nullableleft joinbecomesinner joinAuswirkung
auf /api/content_node/checklist_nodes?camp=/camps/camp_id
Old: (cost=348.72..348.73 rows=1 width=1453)
New: (cost=186.07..186.07 rows=1 width=1453)
Old:
Explain query
New:
Explain query