Oracle® Application Server TopLink Mapping Workbench User's Guide
10g Release 2 (10.1.2) Part No. B15900-01 |
|
Previous |
Next |
You can configure query optimization on any relationship mappings. The optimization requires fewer database calls to read a set of objects from the database. You can configure query optimization on a descriptor's mappings to affect all queries for that class, resulting in a significant system performance gain without changing any application code. Queries can also be optimized on a per-query basis. For more information, see the Oracle Application Server TopLink Application Developer's Guide.
OracleAS TopLink provides two query optimization features on mappings: joining and batch reading.
Joining can be used only on one-to-one mappings. Joining joins the two related classes tables to read all the data in a single query. This feature should be used only if it is known that the target object is always required with the source object, or indirection is not used.
Batch reading can be used in most of the relational mappings, including direct collection mappings, one-to-one mappings, aggregate collection mappings, one-to-many mappings, and many-to-many mappings. This feature should be used only if it is known that the related objects are always required with the source object.