Class RunTimeStatisticsImpl
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.rts.RunTimeStatisticsImpl
-
- All Implemented Interfaces:
RunTimeStatistics
public final class RunTimeStatisticsImpl extends java.lang.Object implements RunTimeStatistics
RunTimeStatistics implemenation.
-
-
Field Summary
Fields Modifier and Type Field Description java.sql.TimestampbeginCompilationTimestampjava.sql.TimestampbeginExecutionTimestamplongbindTimelongcompileTimejava.sql.TimestampendCompilationTimestampjava.sql.TimestampendExecutionTimestamplongexecuteTimelonggenerateTimelongoptimizeTimelongparseTimejava.lang.StringspsNamejava.lang.StringstatementNamejava.lang.StringstatementTextResultSetStatistics[]subqueryTrackingArrayResultSetStatisticstopResultSetStatistics
-
Constructor Summary
Constructors Constructor Description RunTimeStatisticsImpl(java.lang.String spsName, java.lang.String statementName, java.lang.String statementText, long compileTime, long parseTime, long bindTime, long optimizeTime, long generateTime, long executeTime, java.sql.Timestamp beginCompilationTimestamp, java.sql.Timestamp endCompilationTimestamp, java.sql.Timestamp beginExecutionTimestamp, java.sql.Timestamp endExecutionTimestamp, ResultSetStatistics[] subqueryTrackingArray, ResultSetStatistics topResultSetStatistics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptFromTopResultSet(XPLAINVisitor v)initiate a visit of an XPLAINVisitor from the top of the RS treejava.sql.TimestampgetBeginCompilationTimestamp()Get the timestamp for the beginning of query compilation.java.sql.TimestampgetBeginExecutionTimestamp()Get the timestamp for the beginning of query execution.longgetBindTimeInMillis()Get the bind time for the associated query in milliseconds.java.util.Vector<ResultSetStatistics>getChildren()Get the objects to be displayed when this tree object is expanded.longgetCompileTimeInMillis()Get the total compile time for the associated query in milliseconds.java.sql.TimestampgetEndCompilationTimestamp()Get the timestamp for the end of query compilation.java.sql.TimestampgetEndExecutionTimestamp()Get the timestamp for the end of query execution.doublegetEstimatedRowCount()Get the estimated row count for the number of rows returned by the associated query or statement.longgetExecuteTimeInMillis()Get the execute time for the associated query in milliseconds.longgetGenerateTimeInMillis()Get the generate time for the associated query in milliseconds.longgetOptimizeTimeInMillis()Get the optimize time for the associated query in milliseconds.longgetParseTimeInMillis()Get the parse time for the associated query in milliseconds.java.lang.StringgetScanStatisticsText()Get the information on the nodes relating to table and index scans from the execution plan for the associated query or statement as a String.java.lang.StringgetScanStatisticsText(java.lang.String tableName)Get the information on the nodes relating to table and index scans for table tableName from the execution plan for the associated query or statement as a String.java.lang.StringgetSPSName()Get the name of the Stored Prepared Statement for the statement.java.lang.StringgetStatementExecutionPlanText()Get the execution plan for the associated query or statement as a String.java.lang.StringgetStatementName()Get the name of the associated query or statement.java.lang.StringgetStatementText()Get the text for the associated query or statement.java.lang.StringtoString()
-
-
-
Field Detail
-
statementText
public java.lang.String statementText
-
statementName
public java.lang.String statementName
-
spsName
public java.lang.String spsName
-
parseTime
public long parseTime
-
bindTime
public long bindTime
-
optimizeTime
public long optimizeTime
-
generateTime
public long generateTime
-
compileTime
public long compileTime
-
executeTime
public long executeTime
-
beginCompilationTimestamp
public java.sql.Timestamp beginCompilationTimestamp
-
endCompilationTimestamp
public java.sql.Timestamp endCompilationTimestamp
-
beginExecutionTimestamp
public java.sql.Timestamp beginExecutionTimestamp
-
endExecutionTimestamp
public java.sql.Timestamp endExecutionTimestamp
-
topResultSetStatistics
public ResultSetStatistics topResultSetStatistics
-
subqueryTrackingArray
public ResultSetStatistics[] subqueryTrackingArray
-
-
Constructor Detail
-
RunTimeStatisticsImpl
public RunTimeStatisticsImpl(java.lang.String spsName, java.lang.String statementName, java.lang.String statementText, long compileTime, long parseTime, long bindTime, long optimizeTime, long generateTime, long executeTime, java.sql.Timestamp beginCompilationTimestamp, java.sql.Timestamp endCompilationTimestamp, java.sql.Timestamp beginExecutionTimestamp, java.sql.Timestamp endExecutionTimestamp, ResultSetStatistics[] subqueryTrackingArray, ResultSetStatistics topResultSetStatistics)
-
-
Method Detail
-
getCompileTimeInMillis
public long getCompileTimeInMillis()
Get the total compile time for the associated query in milliseconds. Compile time can be divided into parse, bind, optimize and generate times.- Specified by:
getCompileTimeInMillisin interfaceRunTimeStatistics- Returns:
- long The total compile time for the associated query in milliseconds.
-
getParseTimeInMillis
public long getParseTimeInMillis()
Get the parse time for the associated query in milliseconds.- Specified by:
getParseTimeInMillisin interfaceRunTimeStatistics- Returns:
- long The parse time for the associated query in milliseconds.
-
getBindTimeInMillis
public long getBindTimeInMillis()
Get the bind time for the associated query in milliseconds.- Specified by:
getBindTimeInMillisin interfaceRunTimeStatistics- Returns:
- long The bind time for the associated query in milliseconds.
-
getOptimizeTimeInMillis
public long getOptimizeTimeInMillis()
Get the optimize time for the associated query in milliseconds.- Specified by:
getOptimizeTimeInMillisin interfaceRunTimeStatistics- Returns:
- long The optimize time for the associated query in milliseconds.
-
getGenerateTimeInMillis
public long getGenerateTimeInMillis()
Get the generate time for the associated query in milliseconds.- Specified by:
getGenerateTimeInMillisin interfaceRunTimeStatistics- Returns:
- long The generate time for the associated query in milliseconds.
-
getExecuteTimeInMillis
public long getExecuteTimeInMillis()
Get the execute time for the associated query in milliseconds.- Specified by:
getExecuteTimeInMillisin interfaceRunTimeStatistics- Returns:
- long The execute time for the associated query in milliseconds.
-
getBeginCompilationTimestamp
public java.sql.Timestamp getBeginCompilationTimestamp()
Get the timestamp for the beginning of query compilation.- Specified by:
getBeginCompilationTimestampin interfaceRunTimeStatistics- Returns:
- java.sql.Timestamp The timestamp for the beginning of query compilation.
-
getEndCompilationTimestamp
public java.sql.Timestamp getEndCompilationTimestamp()
Get the timestamp for the end of query compilation.- Specified by:
getEndCompilationTimestampin interfaceRunTimeStatistics- Returns:
- java.sql.Timestamp The timestamp for the end of query compilation.
-
getBeginExecutionTimestamp
public java.sql.Timestamp getBeginExecutionTimestamp()
Get the timestamp for the beginning of query execution.- Specified by:
getBeginExecutionTimestampin interfaceRunTimeStatistics- Returns:
- java.sql.Timestamp The timestamp for the beginning of query execution.
-
getEndExecutionTimestamp
public java.sql.Timestamp getEndExecutionTimestamp()
Get the timestamp for the end of query execution.- Specified by:
getEndExecutionTimestampin interfaceRunTimeStatistics- Returns:
- java.sql.Timestamp The timestamp for the end of query execution.
-
getStatementName
public java.lang.String getStatementName()
Get the name of the associated query or statement. (This will be an internally generated name if the user did not assign a name.)- Specified by:
getStatementNamein interfaceRunTimeStatistics- Returns:
- java.lang.String The name of the associated query or statement.
-
getSPSName
public java.lang.String getSPSName()
Get the name of the Stored Prepared Statement for the statement.- Specified by:
getSPSNamein interfaceRunTimeStatistics- Returns:
- java.lang.String The SPS name of the associated query or statement.
-
getStatementText
public java.lang.String getStatementText()
Get the text for the associated query or statement.- Specified by:
getStatementTextin interfaceRunTimeStatistics- Returns:
- java.lang.String The text for the associated query or statement.
-
getEstimatedRowCount
public double getEstimatedRowCount()
Get the estimated row count for the number of rows returned by the associated query or statement.- Specified by:
getEstimatedRowCountin interfaceRunTimeStatistics- Returns:
- The estimated number of rows returned by the associated query or statement.
-
getStatementExecutionPlanText
public java.lang.String getStatementExecutionPlanText()
Get the execution plan for the associated query or statement as a String.- Specified by:
getStatementExecutionPlanTextin interfaceRunTimeStatistics- Returns:
- java.lang.String The execution plan for the associated query or statement.
-
getScanStatisticsText
public java.lang.String getScanStatisticsText()
Get the information on the nodes relating to table and index scans from the execution plan for the associated query or statement as a String.- Specified by:
getScanStatisticsTextin interfaceRunTimeStatistics- Returns:
- java.lang.String The nodes relating to table and index scans from the execution plan for the associated query or statement.
-
getScanStatisticsText
public java.lang.String getScanStatisticsText(java.lang.String tableName)
Get the information on the nodes relating to table and index scans for table tableName from the execution plan for the associated query or statement as a String.- Specified by:
getScanStatisticsTextin interfaceRunTimeStatistics- Parameters:
tableName- table for which user seeks statistics.- Returns:
- java.lang.String The nodes relating to table and index scans from the execution plan for the associated query or statement for tableName.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getChildren
public java.util.Vector<ResultSetStatistics> getChildren()
Get the objects to be displayed when this tree object is expanded.The objects returned can be of any type, including addtional Inspectables.
- Returns:
- java.util.Vector A vector of objects.
-
acceptFromTopResultSet
public void acceptFromTopResultSet(XPLAINVisitor v)
initiate a visit of an XPLAINVisitor from the top of the RS tree- Specified by:
acceptFromTopResultSetin interfaceRunTimeStatistics- Parameters:
v- the visitor that wishes to visit the tree.
-
-