Versions Compared

Key

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

...

OperationExisting solutionProposed solution
Query returning 1 out of N nodesO(N)O(1)
Query returning N out of N nodesO(N2)

O(N)

Based on the data obtained from testing both solutions, performance can be predicted for larger datasets. Given a larger database comprising 25 million datanodes - 100 times larger than used in this study - the following performance is to be expected:

For a database comprising around 1,000,000 data nodes in a single anchor, the following performance was measured:

2 minutes
OperationExisting solutionProposed solution
Query returning 0.01% of all nodes20 seconds< 50 ms
Query returning all nodes45 minutes45 seconds
OperationExpected time for existing solutionExpected time for proposed solution
Query 1 out of N10 minutes10 seconds
Query N out of N40 days

Background

The current implementation of Cps Path queries relies on regular expressions in the generated SQL queries.

...

In this case, each 'device node' node is comprised has 86 data nodes / fragments in the database. In these tests, 4 four anchors were populated using the same data. Thus, for 3000 device nodes, there are 3000 devices x 86 data nodes x 4 anchors = 1,032,000 total data nodes.

Performance Comparison

Query one device out of many (1 out of N)

...