Hibernate's simple read performance test

Source: Internet
Author: User

Test environment:

CPU: duron700 (some projects have caused bottlenecks during testing, which may affect some test results)

Memory: pc1_sdram 512 MB (JVM parameter is added with-xms256m-xmx256m to avoid testing project failure due to insufficient memory)

Hard drive: IBM gxp 2 generation 30 GB 7200 RPM

Windows2000 Professional SP4 Simplified Chinese version

Database: oracle8.1.7 for WindowsNT

JDBC driver: use the official driver ojdbc14.jar

Hibernate closes the database connection pool: hibernate. Connection. pool_size 0

JDBC directly uses drivermanager to connect to the database

If you do not use a connection pool, it is used to eliminate the deviation caused by the performance difference of the connection pool.

If you do not use the app server, you can directly write a Java program for testing to avoid deviations from the app server.

Persistent objects of the test:

package com.fankai;public class Cat {  private String id;  private String name;  private char sex;  private float weight;  public Cat() { }  public String getId() { return id; }  public void setId(String id) { this.id = id; }  public String getName() { return name; }  public void setName(String name) { this.name = name; }  public char getSex() { return sex; }  public void setSex(char sex) { this.sex = sex; }  public float getWeight() { return weight; }  public void setWeight(float weight) { this.weight = weight; }}

For specific charts, see http://forum.javaeye.com/viewtopic.php? T = 32

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.