Hibernate performance tuning (the focus of understanding)

sponsored links

1. Object Cache: fine-grained, in view of the table Record Level, transparent access, without changing the procedure code can greatly enhance the performance of web applications. ORM object cache is a magic weapon for the victory.
2. The merits of the object cache implementation depends on the level of the framework, Hibernate objects are currently known to cache the most powerful open-source ORM
3. Query Cache: coarse-grained for query result sets, real-time data used in less demanding occasions

Eleven. Applications determines the system architecture
First, the need for ORM
Hibernate or iBATIS?
Second, the use of ORM determines the database design
Tend to fine-grained, object-oriented, will go a long table divided into a number of association of small tables, the elimination of redundant column, through the secondary cache to enhance performance (DBA compare the emergence of a taboo relationship, but the ORM cache will exceed the performance bottlenecks associated relations); Hibernate performance bottleneck is not the relationship, but rather the operation of large table
Tend to coarse-grained design, for the relationship and try to put the merger table by table column redundancy, the elimination of relationship. No effective means of cache. iBATIS performance bottleneck is not a great operation, but rather the relationship.

Performance formula
1, the use of two-way one-to-many association, do not use one-way one-to-many
2, flexible use of one-way many-to-one correlation
3, do not have one-on-one, using many-to-one to replace the
4, configure the object cache, the cache does not use a collection
5, one-to-many set to use Bag, many-to-many set to use Set
6, the succession of many types of use of explicit state
7, table fields less, table associated not be afraid of many, has the backing of the secondary cache

Hibernate performance tuning
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Hibernate performance tuning (the focus of understanding)

  • The merits of the field-driven development

    All along, J2ee development process (in Struts + Hibernate + Spring as an example) are as follows: 1. Design Database 2. Generate database 3. From the project to establish database connection 4. Put the database reverse engineering to generate POJO 5 ...

  • Software Performance

    1.1 Software Performance In general, the performance is an indicator that the software system or component to its timeliness requirements in line with the level; followed by software performance, are an indicator can be used to measure time. Performa ...

  • Universal Data Access Control System Design

    Figure II: general data rights management system database design Comparison of two maps, we can see that the main changes between them are: 1, increase system resources, information and operation type information, the system resources for the tree st ...

  • RoR explained

    ROR is Ruby on Rails. Ruby is a well-known has been very good dynamic language It's dynamic language. Simple and easy. Dynamic languages are interpreted, but the performance may make a discount, but not absolute, because the application is complex, th

  • Application of spring struts2.0 hibernate HQL

    Therefore, in the development of statistical inquiry system, as far as possible through the use of select statement to write the required query property way back relational data, and avoid using the first query return persistent object (in this way are in

  • Based on JDBC, JPA Annotation achieve simple CRUD Generic Dao

    The origin of ideas are pretty long history of reasons: [Use iBATIS history] The use of iBATIS has been a long time, the system is to use the CRUD template tool to generate the code, although there are tools to generate, but looked at a lot of CRUD the Sq

  • Hibernate secondary cache

    Hibernate cache: 2-bit cache, also known as process-level cache or SessionFactory level cache, secondary cache can be shared by all of the session Cache configuration and the use of: Will echcache.xml (the document code in hibernate package directory ...

  • The level Hibernate cache

    Hibernate cache level: (1) a cache is very short and the session life cycle consistent, also known as session-level cache-level cache or transaction-level cache (2) Ways of Supporting level cache: get (); load (); iterator (); only entity object cach ...

  • Great collection of java interview topics

    1, object-oriented features of what has 1. Abstract: Abstract is that it has overlooked a subject has nothing to do with the current goal of those aspects in order to more fully with the current objectives of the attention-related aspects. Abstract does n

blog comments powered by Disqus
Recent Entries
Tag Cloud
Random Entries