Task #13240

Analyze full removal of nested set in favor of the current parent relation plus an order column

Added by José Raddaoui Marín almost 2 years ago. Updated 9 months ago.

Status:NewStart date:01/13/2020
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Data model / ORM
Target version:-
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

MySQL 8.0 will be a requirement for AtoM 2.6, due to the inclusion of CTE in the ancestors queries (see #13220 and #13224). This brings up the possibility to also use CTE in the descendants queries and remove the need of a nested set implementation on the hierarchical models.

With the enhancements and tests made on #13224, using CTE to fetch descendants won't be an improvement in most of the cases. However, it will allow us to remove the lft and rgt columns entirely, which will improve (a lot on big data-sets) the insert, move and delete operations of those resources.

In general, we should analyze if we prefer a better performance fetching the hierarchies or making changes to them.


Related issues

Related to Access to Memory (AtoM) - Task #13224: Improve hierarchy management queries Verified 12/09/2019
Related to Access to Memory (AtoM) - Bug #13414: Siblings order is not maintained in archival descriptions... Verified 09/04/2020

History

#1 Updated by José Raddaoui Marín almost 2 years ago

  • Related to Task #13224: Improve hierarchy management queries added

#2 Updated by José Raddaoui Marín 9 months ago

  • Related to Bug #13414: Siblings order is not maintained in archival descriptions CSV import added

#3 Updated by José Raddaoui Marín 9 months ago

Changes from https://github.com/artefactual/atom/pull/1252 (#13414) should help with this implementation.

Also available in: Atom PDF