Versions Compared

Key

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

...

Given the following (incomplete) fragment table:

idparent_idanchor_idxpath
1NULL3/bookstore
213/bookstore/categories[@code='1']
323/bookstore/categories[@code='1']/books[@title='Matilda']
423/bookstore/categories[@code='1']/books[@title='The Gruffalo']
513/bookstore/categories[@code='2']
653/bookstore/categories[@code='2']/books[@title='Good Omens']
753/bookstore/categories[@code='2']/books[@title='The Colour of Magic']
8NULL4/dmi-registry
984/dmi-registry/cm-handles[@id='d99ef4cc8d744a749490cceefd4c469e']

Here is a visualization of both algorithms:

Existing solutionProposed solution

Image Removed

Image Removed

Because the existing solution uses a regex,

all fragments in anchor 3 need to be examined, so see if they match the regex.Because the proposed solution uses sub-queries to look up

each path component, only relevant fragments are examined.

Image Added

Image Added


A note on fetching descendant nodes

...