AM Pool Sizing Configurations

9-2 Oracle Fusion Middleware Performance and Tuning Guide old Java object POJO class that is mapped to the database and configured for usage through JPA using annotations, persistence XML, or both. This chapter focuses on tuning JPA in the context of EJB3.0 and a Java EE environment. The information in this chapter assumes that you are familiar with the basic functionality of EclipseLink. Before you begin tuning, consider reviewing the introductory information found at the following: ■ Introduction to Java Persistence API section of the EclipseLink Developers Guide at http:wiki.eclipse.orgIntroduction_to_Java_ Persistence_API_ELUG ■ Introduction to EclipseLink JPA section of EclipseLink Developers Guide at http:wiki.eclipse.orgIntroduction_to_EclipseLink_JPA_ 28ELUG29 ■ Considering JPA Entity Architecture at http:wiki.eclipse.orgIntroduction_to_EclipseLink_ Application_Development_ELUGConsidering_JPA_Entity_ Architecture ■ Introduction to EclipseLink Queries at http:wiki.eclipse.orgIntroduction_to_EclipseLink_Queries_ ELUG ■ Introduction to Cache at http:wiki.eclipse.orgIntroduction_to_ Cache_ELUG ■ Introduction to Mapping and Configuration at http:wiki.eclipse.orgIntroduction_to_EclipseLink_Mapping_ and_Configuration_ELUG For more information on Oracle TopLink, see the TopLink page on OTN http:www.oracle.comtechnologyproductsiastoplinkindex.html . [Note that as of Oracle TopLink Release 11g, the older Toplink APIs have been deprecated. For more information, see the TopLink Release Notes at http:www.oracle.comtechnologyproductsiastoplinkdoc11110 relnotestoplink-relnotes.htmlCHDGAEDJ ]

9.2 Efficient SQL Statements and Queries

This section covers using efficient SQL statements and SQL querying. Table 9–1 and Table 9–2 show tuning parameters and performance recommendations related to SQL statements and querying. Note: This chapter serves as a quick start guide to performance tuning JPA in the context of a Java EE environment. While the chapter provides common performance tuning considerations and related documentation resources, it is not meant to be comprehensive list of areas to tune. 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.