Versions Compared

Key

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

...

Code Block
languagesql
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"}'
        )

...

CaseQuery one out of many using descendant cps pathQuery 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

Image Removed

Image Removed



Time complexity of
existing solution

O(N)O(N)
Time complexity of
proposed solution
 O(1)O(1)

...

Image Removed
Fetch descendantsOmit Descendants

Direct Descendants

All Descendants

Comparison graph

Image Removed

Image Removed




Graph detail

Image Removed




Time complexity of
existing solution

O(N)O(N2)O(N2)
Time complexity of
proposed solution
O(N)O(N)O(N)

...

Image RemovedImage Removed
Fetch descendantsOmit DescendantsDirect DescendantsAll Descendants
Comparison graph

Image Removed

Image Removed




Graph detail

Image Removed




Time complexity of
existing solution

O(N)O(N2)O(N2)
Time complexity of
proposed solution
O(N)O(N)O(N)

...