Thanks, Christian. I’ll try to be more specific…
Does an optimized database perform better than an unoptimized database for db:open? How about for db:list? Or db:retrieve?
As for the another process locking the accessed database, is it possible to have multiple, open db connections, within the same JVM, and use one of them to optimize and another to read from the db? I’m asking because my testing indicates that I can only have one open connection if I want to run db:optimize. If I have two open connections (again, within the same JVM), then my db:optimize will fail.
Thanks,
Joe
On 8/1/16, 4:51 PM, "Christian Grün" christian.gruen@gmail.com wrote:
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