collection('db')/a[@att = 'xxx' and b/text() = 'zzz'] on my laptop (Intel I7, 8 GB Ram and SSD) takes some 5 to 7 seconds.
How does your query plan look like?
What I noticed and this is feeling strange is that the time is often spent in rather similar proportion between query compilation and query evaluation and in some runs (1 every 5) most of the time is spent in compilation and only few msec in evaluation.
Do the query plany differ as well? What times do you get?
Here I noticed that the difference between plain and xquery:eval() execution is negligible when the time for the evaluation increases. So I assume that the xquery:eval is using the indexing system even if this is not reported in the info view of the GUI. Is it like that?
Exactly; xquery:eval queries are optimized the same way as usual queries.