Native Queries will run out of the box in any environment. If optimization is turned on (default) Native Queries will be converted to SODA where this is possible, allowing db4o to use indexes and optimized internal comparison algorithms.Otherwise Native Query may be executed by instantiating all objects, using SODA Evaluations. Naturally performance will not be as good in this case.
NQ optimisation on Java requires db4onqopt.jar to be present in the CLASSPATH.
The Native Query optimizer is still under development to eventually "understand" all Java constructs. Current optimization supports the following constructs well:
This list will constantly grow with the latest versions of db4o.
Note that the current implementation doesn't support polymorphism and multiline methods yet.
db4o for Java supplies three different possibilities to run optimized native queries, optimization at
For more information on NQ optimization see Monitoring Optimization.