Hibernate performance tuning (the focus of understanding)

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

分类:Java 时间:2009-03-03 人气:1260
blog comments powered by Disqus


  • Using object-oriented technology to create advanced Web applications 2010-12-30

    JavaScript object is a dictionary in C + + or C #, talking about the object is an instance of a class or structure. Objects have different properties and methods, depending on their instance of the template (ie class). The JavaScript object is not so. In

  • Through the secondary cache to speed up your hibernate application 2009-04-19

    Keywords: hibernate second cache Flanging edge because I also learn, there is nothing inevitable place undue Translations are welcome to U.S. criticism Original Title: Speed Up Your Hibernate Application with Second-Level Caching Original Source: http://w

  • Hibernate secondary cache 2009-02-27

    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 ...

  • Cache and secondary cache 2010-11-01

    Cache is located in the application and physical data sources, for temporary storage of memory copy of data, the purpose is to reduce the application range of the number of physical data sources to improve the operating performance of the application

  • Hibernate cache and secondary cache integrated 2010-11-28

    Transfer from http://myoraclex.blog.51cto.com/2288027/413177 1, Hibernate Caching Overview Cache is physical data sources and between applications, and is the database data stored in memory temporary copy of the container, its role is to reduce applicatio

  • Hibernate in a cache. 2 cache and query cache summary 2010-06-25

    First, a cache 1. A cache only caches the object, not the cache object properties; 2. A Session-level cache is a cache can not be used across multiple Session objects; 3. Session of the load / get methods to support a cache read and write; 4. Query t

  • Hibernate in a cache. 2 cache and query cache technical summary 2010-09-15

    First, a cache 1. A cache only cache the whole object, not the cache object properties; 2. A Session-level cache is a cache can not be used across multiple Session objects; 3. Session of the load / get methods to support a cache read and write; 4. Query t

  • Large-scale dynamic web application system architecture design 2011-02-22

    http://www.y513.com/201010658.html Large dynamic application platform is mainly aimed at high-volume, high concurrency site to establish the underlying system architecture. Large-scale operation of the site needs a reliable, secure, scalable, maintainable

  • Web development and design of the Google arms spectrum-Web development and design tool 2010-04-22

    The author is a Java enthusiasts also use Java for web development worker. I usually favorite browser is Firefox, because it can take a lot of IE I do not have outstanding debugging functions, I always felt that MS should say very seriously looks like the

  • Hibernate + ehcache secondary cache 2009-05-12

    Hibernate + ehcache secondary cache 2006-09-02 05:00 Author: Source: csdn duty Edit: Ark 1, the first set EhCache, set up configuration files ehcache.xml, the default position at the class-path, you can put the src directory: < ?xml version="1.0" encoding

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.420 (s). 14 q(s)