Versions Compared

Key

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

...

Image Removed and yellow been checked against the regex
Existing solutionProposed solution

Because the existing solution uses a regex, all fragments in anchor 3 need to be examined to see if they match the regex.

  • Green and yellow nodes have been checked against the regex.
  • Yellow nodes have had JSON attributes examined.

Because the proposed solution uses sub-queries to look up each path component, only relevant fragments are examined.

  • Green
  • nodes have
  • looked up using an index-only lookup.
  • Yellow nodes have had JSON attributes examined.

Image Added

  • Green nodes have looked up using an index-only lookup.
  • Yellow nodes have had JSON attributes examined.

    If the number of nodes is doubled, the number of xpaths checked against the regex is also doubled (linear complexity).

    Image Added

    If the number of nodes is doubled, the same number of nodes is still scanned in this case (constant complexity).

    Image Added

    A note on fetching descendant nodes

    ...