Hi Sandra,
for $c in basex:db("chaingang")//person[@key="ccc86809"] let $links := basex:db("fasdb")//linkGrp[link=$c/@target] return ($c, $links, basex:db("fasdb")//person[@key=($links//link/text())])
True – it's no problem to access several databases within one query. And it should be no problem to split up your db into several smaller ones. It might even get mandatory if you reach the database limits; see
The only drawback you might come across is that the filesystem will cause troubles if too many open files are to be managed at the same time. 30 databases should be completely ok, though.
Some questions, just out of curiosity: – how much XML data (mb/gb) do you currently work with? – how much time needs BaseX in your context for update operations and the optimize command? – do you already have encountered performance limits in everyday use, or do you rather try to prevent potential bottlenecks in future?
In another real-life scenario that might be similar to yours, BaseX is used as backend for a library database with 2 Mio. titles (~1 GB of XML data). The process of updating the data and recreating the indexes is applied once a day/night and takes appr. 2 minutes.
Thanks again to the developers -- bravo!!
…and thanks for always giving instructive feedback! Christian