Hi Joe,
Does an optimized db (via db:optimize) perform any differently than an un-optimized db for document retrieval, as opposed to XQuery execution over document(s)?
If you perform updates on a database, your queries may get slower over time. db:optimize can be used to speed up queries again. Does that answer your query? I must confess I do not exactly understand which difference you see between "document retrieval" and "XQuery execution over document(s)"; could you please give me some more hints?
Also, I noticed that I would see the “Database ‘foo’ is currently opened by another process” error message even if there was only had one *other* db connection, within the same JVM. Is this expected? Or would you think that there must be another process (separate JVM) connected to the db?
There must be at least one other process locking the accessed database (see [1] for more info). Did you open the GUI at the same time?
Christian
[1] http://docs.basex.org/wiki/Transaction_Management#Database_Locks