org.hibernate.stat

Class QueryStatistics

Implemented Interfaces:
Serializable

public class QueryStatistics
extends CategorizedStatistics

Query statistics (HQL and SQL) Note that for a cached query, the cache miss is equals to the db count
Author:
Gavin King

Method Summary

long
getCacheHitCount()
Queries retrieved successfully from the cache
long
getCacheMissCount()
long
getCachePutCount()
long
getExecutionAvgTime()
average time in ms taken by the excution of this query onto the DB
long
getExecutionCount()
queries executed to the DB
long
getExecutionMaxTime()
max time in ms taken by the excution of this query onto the DB
long
getExecutionMinTime()
min time in ms taken by the excution of this query onto the DB
long
getExecutionRowCount()
Number of lines returned by all the executions of this query (from DB) For now, Query.iterate() and org.hibernate.Query.scroll()() do not fill this statistic
String
toString()

Methods inherited from class org.hibernate.stat.CategorizedStatistics

getCategoryName

Method Details

getCacheHitCount

public long getCacheHitCount()
Queries retrieved successfully from the cache

getCacheMissCount

public long getCacheMissCount()

getCachePutCount

public long getCachePutCount()

getExecutionAvgTime

public long getExecutionAvgTime()
average time in ms taken by the excution of this query onto the DB

getExecutionCount

public long getExecutionCount()
queries executed to the DB

getExecutionMaxTime

public long getExecutionMaxTime()
max time in ms taken by the excution of this query onto the DB

getExecutionMinTime

public long getExecutionMinTime()
min time in ms taken by the excution of this query onto the DB

getExecutionRowCount

public long getExecutionRowCount()
Returns:
The number of rows cumulatively returned by the given query; iterate and scroll queries do not effect this total as their number of returned rows is not known at execution time.

toString

public String toString()