Mic,
first to your XQuery:
If I am right you are looking for with name F and G where F is “epointing” to G.
If you store -documents instead of sets of a XQuery should look something like:
for $a in input()
let $c := $a[@name=“F”]
let $d := $a[@name=“G” and @id=$c/forward/@pointer]
return
{$c}
{$d}
so you are just starting one level lower, $a substitutes $b.
Regarding the performance:
- You should expect improvements storing smaller documents. I would suggest storing -documents.
Why?
Tamino works like a DBMS. It is very good picking a certain instance out of a huge number of instances. This is also where the indeces are helping. If you have to do lot of work on a specific instance, this is expensive as you encountered. Also indeces do not help that much as you experienced. The indeces speed up finding the instance, not working on the instance itself.
So as a rule of thumb for performance with tamino:
- many documents in one doctype
- documents size not too big
- try to avoid “grouping” or sets of similar subdocuments in one bigger documents - better to break it into smaller ones. Let XQuery do the work to put it back together.
- use indices on search fields (again: fast to find a specific instance out of similar ones - will not speed up much work on a single, large instance)
If you have further questions, you could also post your schema, example docs and queries to the list (zipped), I am sure you get a “tailored” help!
regards,
Timm
#Tamino#webMethods#API-Management