Tips for Administrators

  • Ensure shutdown happens every time - otherwise restart/recovery could take some time. The larger the tables that have not been saved, the longer recovery will take.

  • In any long-running applictaion, open the desired database on startup and leave it open until shutdown. This prevents startup and shutdown of the database for each connection.

  • With the Admin API, i.e. using the internal DataCaster APIs, sharing a DbFactory or TxFactory instance across threads can be problematic. Therefore limite threads using the same database in that mode, and if multiple threads are using the sam einstance call DbSessions.setThreadUser() before invoking TxFactory/DbFactory methods.

  • You can control how often to invoke Lucene optimization using the search.xml configuration parameters. However, Lucene search requires optimization before too long, otehrwise you may get an error and fail all over the place with a too many files open issue. Please consult the Lucene documentation on setting the search parameters and open file limits if required.

  • Suspend or minimize all high-volume changes to a database during archiving, otherwise it could hold up all activity after some time if too active.

  • When necessary to move data from one table into a new table with the identical definition, there is a file copy mechanism that may come in handy. You can can create a new empty table, and with the database shutdown, copy the old table index files to new table index files, renaming the index files with exactly same names as the existing empty files. Be sure to run CheckTable after copying index files. If this is not done, tuple ids in a table can get duplicated, resulting in unpleasant surprises when using the table in queries and views.

  • Memory management is not available for the TEXT data type, and hence for cases where you have many large TEXT values in a table, the table index cache size needs to be reduced to prevent excessing memory consumption.

  • Lock updates for large transactions - breakup tx.

  • For the Admin API, which should be used only for rare maintenance activity, defensive copies are often not made for performance reasons. Please avoid modifying arrays returned by the Admin API, e.g. table.encodeOrder(). Unlike the User API, the Admin API is directly used internally, and array copies impact performance and are therefore minimized.