Package org.h2.engine

# Class QueryStatisticsData

java.lang.Object
org.h2.engine.QueryStatisticsData

public class QueryStatisticsData extends Object
Maintains query statistics.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`QueryStatisticsData.QueryEntry`
The collected statistics for one query.

## Constructor Summary

Constructors
Constructor
Description
`QueryStatisticsData(int maxQueryEntries)`

## Method Summary

Modifier and Type
Method
Description
`List<QueryStatisticsData.QueryEntry>`
`getQueries()`
`void`
`setMaxQueryEntries(int maxQueryEntries)`
`void`
`update(String sqlStatement, long executionTimeNanos, long rowCount)`
Update query statistics.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### QueryStatisticsData

public QueryStatisticsData(int maxQueryEntries)

## Method Details

### setMaxQueryEntries

public void setMaxQueryEntries(int maxQueryEntries)

### getQueries

public List<QueryStatisticsData.QueryEntry> getQueries()

### update

public void update(String sqlStatement, long executionTimeNanos, long rowCount)
Update query statistics.

Parameters:
  `sqlStatement` - the statement being executed
  `executionTimeNanos` - the time in nanoseconds the query/update took to execute
  `rowCount` - the query or update row count