...
A new Cps Path query algorithm is being proposed. The time complexity was measured for existing and proposed solutions, and is found to be:
OperationTime complexity | Existing solution | Proposed solution |
---|---|---|
Query returning 1 out of N nodesBest case | O(N) | O(1) |
Query returning all N out of N nodesWorst case | O(N2) | O(N) |
For a database comprising over 1,000,000 data nodes in a single anchor, the following results were recorded:
...
- An SQL query that returns nodes matching query criteria - O(N)
- For each node returned from query 1: issue an , another SQL query is issued to fetch that node with descendants, using a LIKE operator - O(N).
...
Possible improvements of proposed solution
Cps Path Query capabilities can be
...
extendedFor a database comprising over 1,000,000 data nodes in a single anchor, the following results were recorded:
Presently, Cps Path queries limit leaf-condition, text-condition, etc. to the final path component. The proposed solution allows for future improvement where conditions could be applied to any or all path components.
...