After having done the EJB3 implementation, then we walk into the performacne issue.
I google it to get “Hibernate/EJB3 Tuning“. Also I suggest you to look at book of “Manning EJB3 in action” to find out tuning your EJB3 project.

Here I posted some from book.

13.2 Improving entity performance
–13.2.1 Remodeling and schema redesign
—-Merging tables
—-Dividing a table into multiple tables
—-Choosing the right inheritance strategy
–13.2.2 Tuning the JDBC layer
—-Properly sizing the connection pool
—-Caching SQL statements
—-Using named queries
—-Avoiding transactions for read-only queries
–13.2.3 Reducing database operations
—-Choosing the right fetch type
—-Deferring database updates until the end of transactions
—-Using the lowest-cost lock in the database
—-Using DELETE_CASCADE appropriately
—-Using the cascade property
—-Bulk updates
—-Avoiding association tables in one-to-many relationships
–13.2.4 Improving query performance
—-Avoiding full-table scans
—-Using indexes to make queries faster
—-Filtering based on a nonidentity field
—-Using indexes for relationship fields
—-Ordering a collection of entities
—-Using functions in the WHERE clause of JPQL
—-Reducing round-trips to the database
–13.2.5 Caching
—-Using an extended persistence context
—-Persistence unit level cache
—-Read-only entities

Advertisements