...
Operation | Existing solution | Proposed solution |
---|---|---|
Query returning 1 out of N nodes | O(N) | O(1) |
Query returning N out of N nodes | O(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:
Operation | Existing solution | Proposed solution |
---|---|---|
Query returning 0.01% of all nodes | 20 seconds | < 50 ms |
Query returning all nodes | 45 minutes | 45 seconds |
Operation | Expected time for existing solution | Expected time for proposed solution |
Query 1 out of N | 10 minutes | 10 seconds |
Query N out of N | 40 days | 2 minutes
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)
...