Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 complexityExisting solutionProposed solution
Query returning 1 out of N nodesBest caseO(N)O(1)
Query returning all N out of N nodesWorst caseO(N2)

O(N)

For a database comprising over 1,000,000 data nodes in a single anchor, the following results were recorded:

...

  1. An SQL query that returns nodes matching query criteria - O(N)
  2. 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.

...