...
Existing solution | Proposed solution | |||
---|---|---|---|---|
Because the existing solution uses a regex, all fragments in anchor 3 need to be examined to see if they match the regex.
| Because the proposed solution uses sub-queries to look up each path component, only relevant fragments are examined. |
| and yellow
| been checked against the regex
|
If the number of nodes is doubled, the number of xpaths checked against the regex is also doubled (linear complexity). | If the number of nodes is doubled, the same number of nodes is still scanned in this case (constant complexity). |
A note on fetching descendant nodes
...