Record Class QueryStats
java.lang.Object
java.lang.Record
com.loomcache.server.query.QueryStats
public record QueryStats(long parseTimeNs, long executeTimeNs, long rowsScanned, long rowsReturned)
extends Record
Statistics about query execution performance.
Records timing and cardinality information for analysis and optimization.
-
Constructor Summary
ConstructorsConstructorDescriptionQueryStats(long parseTimeNs, long executeTimeNs, long rowsScanned, long rowsReturned) Creates an instance of aQueryStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longExecute time in milliseconds.longReturns the value of theexecuteTimeNsrecord component.final inthashCode()Returns a hash code value for this object.longParse time in milliseconds.longReturns the value of theparseTimeNsrecord component.longReturns the value of therowsReturnedrecord component.longReturns the value of therowsScannedrecord component.doubleSelectivity ratio: rowsReturned / rowsScanned.final StringtoString()Returns a string representation of this record class.longTotal execution time in milliseconds.longTotal execution time (parse + execute) in nanoseconds.
-
Constructor Details
-
QueryStats
public QueryStats(long parseTimeNs, long executeTimeNs, long rowsScanned, long rowsReturned) Creates an instance of aQueryStatsrecord class.- Parameters:
parseTimeNs- the value for theparseTimeNsrecord componentexecuteTimeNs- the value for theexecuteTimeNsrecord componentrowsScanned- the value for therowsScannedrecord componentrowsReturned- the value for therowsReturnedrecord component
-
-
Method Details
-
totalTimeNs
public long totalTimeNs()Total execution time (parse + execute) in nanoseconds. -
totalTimeMs
public long totalTimeMs()Total execution time in milliseconds. -
parseTimeMs
public long parseTimeMs()Parse time in milliseconds. -
executeTimeMs
public long executeTimeMs()Execute time in milliseconds. -
selectivity
public double selectivity()Selectivity ratio: rowsReturned / rowsScanned. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
parseTimeNs
public long parseTimeNs()Returns the value of theparseTimeNsrecord component.- Returns:
- the value of the
parseTimeNsrecord component
-
executeTimeNs
public long executeTimeNs()Returns the value of theexecuteTimeNsrecord component.- Returns:
- the value of the
executeTimeNsrecord component
-
rowsScanned
public long rowsScanned()Returns the value of therowsScannedrecord component.- Returns:
- the value of the
rowsScannedrecord component
-
rowsReturned
public long rowsReturned()Returns the value of therowsReturnedrecord component.- Returns:
- the value of the
rowsReturnedrecord component
-