AM Pool Resource Cleanup Configurations

Oracle TopLink EclipseLink JPA Performance Tuning 9-3 Table 9–1 EJBJPA Using Efficient SQL Statements and Querying Tuning Parameter Description Performance Notes Parameterized SQL Binding Using parameterized SQL and prepared statement caching, you can improve performance by reducing the number of times the database SQL engine parses and prepares SQL for a frequently called query. EclipseLink enables parameterized SQL by default. However, not all databases and JDBC drivers support these options. Note that the Oracle JDBC driver bundled with Oracle Application Server does support this option. The persistence property in persistence.xml eclipselink.jdbc.bind-parameters is used to configure this. See Also: Using EclipseLink JPA Extensions - Bind Parameters at http:wiki.eclipse.orgUsing_ EclipseLink_JPA_Extensions_ELUGBind_ Parameters Default Value: PERSISTENCE_UNIT_DEFAULT which is true by default Leave parameterized SQL binding enabled for selected databases and JDBC drivers that support these options. JDBC Statement Caching Statement caching is used to lower the performance impact of repeated cursor creation and repeated statement parsing and creation; this can improve performance for applications using a database. Note: For Java EE applications, use the data sources statement caching and do not use EclipseLink Statement Caching for EJB3.0JPA, for example: eclipselink.jdbc.cache-statements=tru e. Set this option in an Oracle Weblogic data-source by setting Statement Cached Type and Statement Cached Size configuration options. See also Increasing Performance with the Statement Cache in Oracle Fusion Middleware Configuring and Managing JDBC for Oracle WebLogic Server. Default Value: The Oracle Weblogic Server data source default statement cache size is 10 statements per connection. You should always enable statement caching if your JDBC driver supports this option. The Oracle JDBC driver supports this option. 9-4 Oracle Fusion Middleware Performance and Tuning Guide Fetch Size The JDBC fetch size gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. For large queries that return a large number of objects, you can configure the row fetch size used in the query to improve performance by reducing the number database hits required to satisfy the selection criteria. See Also: Using EclipseLink JPA Extensions - Fetch Size at http:wiki.eclipse.orgUsing_ EclipseLink_JPA_Extensions_ELUGBind_ Parameters Most JDBC drivers use a default fetch size of 10. If you are reading 1000 objects, increasing the fetch size to 256 can significantly reduce the time required to fetch the querys results. Note: The default value means use the JDBC driver default value, which is typically 10 rows for the Oracle JDBC driver. To configure this, use query hint eclipselink.jdbc.fetch-size. Default Value: 0 The optimal fetch size is not always obvious. Usually, a fetch size of one half or one quarter of the total expected result size is optimal. Note that if you are unsure of the result set size, incorrectly setting a fetch size too large or too small can decrease performance. Batch Writing Batch writing can improve database performance by sending groups of INSERT, UPDATE, and DELETE statements to the database in a single transaction, rather than individually. The persistence property in persistence.xml eclipselink.jdbc.batch-writing=JDBC is used to configure this. See Also: How to Use Batch Writing for Optimization at http:wiki.eclipse.orgOptimizing_the_ EclipseLink_Application_ELUGHow_to_ Use_Batch_Writing_for_Optimizatio Default Value: Off Enable for the persistence unit. Change Tracking This is an optimization feature that lets you tune the way EclipseLink detects changes in an Entity. See Also: Using EclipseLink JPA Extensions for Tracking Changes at http:wiki.eclipse.orgUsing_ EclipseLink_JPA_Extensions_ ELUGUsing_EclipseLink_JPA_ Extensions_for_Tracking_Changes Default Value: AttributeLevel if using weaving Java EE default, otherwise Deferred. Leave at default AttributeLevel for best performance. Weaving Can disable through persistence.xml properties eclipselink.weaving Default Value: On Leave on for best performance. Table 9–1 Cont. EJBJPA Using Efficient SQL Statements and Querying Tuning Parameter Description Performance Notes