Package org.apache.derby.impl.sql
Class GenericPreparedStatement.RowCountStatistics
- java.lang.Object
-
- org.apache.derby.impl.sql.GenericPreparedStatement.RowCountStatistics
-
- Enclosing class:
- GenericPreparedStatement
private static class GenericPreparedStatement.RowCountStatistics extends java.lang.Object
This class holds information about stale plan check interval, execution count and row count statistics for a GenericPreparedStatement. The fields and methods should ideally live in GenericPreparedStatement, not in a separate class. However, triggers clone the GPS on each execution, which means the statistics would be reset on each execution if they lived directly inside GPS. Instead, keep the statistics in an object that can be shared between multiple GPS instances when they are cloned.
-
-
Field Summary
Fields Modifier and Type Field Description private int
executionCount
private java.util.ArrayList<java.lang.Long>
rowCounts
private int
stalePlanCheckInterval
-
Constructor Summary
Constructors Modifier Constructor Description private
RowCountStatistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) long
getInitialRowCount(int rsNum, long rowCount)
(package private) int
getStalePlanCheckInterval()
(package private) int
incrementExecutionCount()
(package private) void
reset()
Reset all the row count statistics.(package private) void
setStalePlanCheckInterval(int interval)
-
-
-
Method Detail
-
incrementExecutionCount
int incrementExecutionCount()
-
getInitialRowCount
long getInitialRowCount(int rsNum, long rowCount)
-
setStalePlanCheckInterval
void setStalePlanCheckInterval(int interval)
-
getStalePlanCheckInterval
int getStalePlanCheckInterval()
-
reset
void reset()
Reset all the row count statistics.
-
-