======= http://jena.hpl.hp.com/wiki/TDB/Concurrency This page describes the concurrency issues with the standard native storage layer in TDB. Other storage layers may have different characteristics. The native storage layer for TDB is MRSW (Multiple Reader Single Writer) DatasetTDB.getLock Model API: list* is a stream. Can't add while iterating over a list* ======= http://jena.hpl.hp.com/wiki/TDB/Optimizer ==Investigating what is going on== TDB can optionally log query execution details. This is controlled by two setting: the logging level and a context setting. Having two setting means it is possible to log some queries and not others. The logger used is called com.hp.hpl.jena.tdb.exec. Message are sent at level "info". So, for log4j, the following can be set in the log4j.properties file: log4j.logger.com.hp.hpl.jena.tdb.exec=INFO The context setting is for the key (Java constant) TDB.symLogExec. To set globally: TDB.getContext().set(TDB.symLogExec, Explain.InfoLevel.ALL) ; and it may also be set on an individual query execution using the local context of the execution. QueryExecutiuon qExec = QueryExecutionFactory.create(...) ; qExec.getContext().set(TDB.symLogExec, Explain.InfoLevel.ALL) ; or from the command line: tdbquery --set tdb:logExec=all --file queryfile === Information Levels === The information levels are given by the enum Explain.InfoLevel: {| class="wikitable" style="margin: 1em auto 1em auto" |+ Information levels for TDB execution logging. ! Level ! Effect |- ! INFO | Log each query |- ! FINE | Log each query and it's algebra form after optimization |- ! ALL | Log query, algebra and every database access |- ! NONE | No query execution logging. |} The level ALL can be expensive because of the volume of information that can be written to the log. == Setting the context == The value in the context can be the enum or a string of the same spelling (this is tested without case distinction). Detailed logging was introduced with TDB 0.8.3.