...
Code Block | ||
---|---|---|
| ||
SELECT
*
FROM
fragment
WHERE
parent_id IN (
SELECT
id
FROM
fragment
WHERE
xpath_component = 'categories[@code=''1'']'
AND parent_id = (
SELECT
id
FROM
fragment
` WHERE
xpath_component = 'bookstore'
AND anchor_id = 3
AND parent_id IS NULL
)
)
AND (
xpath_component = 'books'
OR xpath_component LIKE 'books[%'
)
AND (
attributes @> '{"title":"Matilda"}'
) |
...
Case | Query one out of many using descendant cps path | Query one out of many using absolute cps path | ||
---|---|---|---|---|
Query | //openroadm-device[@device-id="C201-7-1A-14"] | /openroadm-devices/openroadm-device[@device-id="C201-7-1A-19"] | ||
Comparison graph | ||||
Time complexity of | O(N) | O(N) | ||
Time complexity of proposed solution | O(1) | O(1) |
...
Fetch descendants | Omit Descendants | Direct Descendants | All Descendants | |||
---|---|---|---|---|---|---|
Comparison graph | ||||||
Graph detail | ||||||
Time complexity of | O(N) | O(N2) | O(N2) | |||
Time complexity of proposed solution | O(N) | O(N) | O(N) |
...
Fetch descendants | Omit Descendants | Direct Descendants | All Descendants | |||
---|---|---|---|---|---|---|
Comparison graph | ||||||
Graph detail | ||||||
Time complexity of | O(N) | O(N2) | O(N2) | |||
Time complexity of proposed solution | O(N) | O(N) | O(N) |
...