Tuesday, May 5, 2009

Performance Competition Within Hibernate Query Methods

Table or Object Struct:
    private Integer    historyId;
private Integer accountId;
private Date historyDate;
private Double units;
private Double sharePrice;
private Double amount;
private Integer createId;
private Date createDate;



Rows in the Table:
40797


Performance Competition (time unit is ms) :



conclusion:

findByNamedQuery(namedQuery) > createCriteria(clazz).list() > loadAll(clazz) > createSQLQuery(sqlString).addEntity(clazz).list(), but basically they are in the one level.

No comments:

Post a Comment