Thanks for the guidance, Christian. I do have two short follow-up questions:
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)?
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?
Thanks again,
Joe
On 7/30/16, 4:22 PM, "Christian Grün" christian.gruen@gmail.com wrote:
Hi Joe,
Welcome to the list!
> Does 'optimize all' perform all available optimizations or are there other > parameters (indexing or full-text as mentioned at > http://docs.basex.org/wiki/Database_Module#db:optimize) to supply?
If optimize is called (with and without all), the existing index structures will be updated. Via db:optimize, you can additionally, enable or disable specific index structures. If you run 'optimize all', the database will be completely rebuilt.
> Is read/write possible to a database undergoing optimization? I’m guessing > no because I get an error (“Database ‘foo’ is currently opened by another > process”) whenever another connection to the database is open.
Right. This error indicates that you should always access a database within the same JVM context (unless you restrict yourself to read operations) [1].
> On what size or content of databases does optimization have a significant > impact? Currently on a 400Mb database, I don't see any performance benefits > after optimization.
Optimizations are only required after update operations. A newly created database is fully optimized. If you believe that specific queries should run faster, feel free to provide us with the query strings.
Cheers Christian
[1] http://docs.basex.org/wiki/Startup#Concurrent_Operations