Funding Request: Path-based queries

The current CR implementation with DBAL adapter stores the graph in a relational database. This is in general not the most efficient way of storing graphs. The nodes are stored only with information about there parent/child relations (hierarchy relation) and their siblings (position). This works very well for queries of direct childs and parents.

But if you query nodes within a sub-tree of the graph you have to build the whole graph first and filter afterwards. This is very slow if you do searches on bigger sub-trees, e.g. “find all headlines of the website” or “find all news article from may in all categories”.

The goal is to remove the recursive queries (CTEs) if applicable and replace them with path-based queries. This shall result in:

  • Better read performance (Reduced subset to work on, no need to build the full graph)
  • Easier SQL queries (CTEs → Simple SELECT Statements)
  • Improved sorting (less recalculation of positions)

For all details have a look into this experiment PR description:

What is the plan?

  • Implement fractional indexing as path segments
  • Implement NodeSortPaths
  • Adapt Neos ContentGraphDbalAdapter to NodeSortPaths
  • Replace CTE Queries (findSubtree, findDescendantNodes, findAncestorNodes, …) with path based queries
  • Verify and document performance impact (before/after, read/write)

Who will work on this?

  • @lubitz
  • anyone who wants to join in

What do we need?

I’d like to apply for a funding of 4.000 € / 40h.

Please add your vote to the poll or leave your comment/questions below.

  • Yes
  • No
0 voters

I’ll close the voting on Monday 5th October 2026 12:00 CEST.

1 Like