Skip to content

Commit

Permalink
TASK: Add indices to improve parent/child query performance
Browse files Browse the repository at this point in the history
We did not have any index on the parentnodeanchor,
additionally the anchors should be first, as they are most
likely the most discriminating part of the query, also
position was added, to potentially improve sort queries.
  • Loading branch information
kitsunet committed Sep 23, 2024
1 parent a6b3fb6 commit abf2b02
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ private function createHierarchyRelationTable(): Table
->addIndex(['childnodeanchor'])
->addIndex(['contentstreamid'])
->addIndex(['parentnodeanchor'])
->addIndex(['contentstreamid', 'childnodeanchor', 'dimensionspacepointhash'])
->addIndex(['childnodeanchor', 'contentstreamid', 'dimensionspacepointhash', 'position'])
->addIndex(['parentnodeanchor', 'contentstreamid', 'dimensionspacepointhash', 'position'])
->addIndex(['contentstreamid', 'dimensionspacepointhash']);
}

Expand Down

0 comments on commit abf2b02

Please sign in to comment.