#[non_exhaustive]pub struct QueryStatEntry {
pub query_id: String,
pub query_text: String,
pub calls: u64,
pub total_exec_time_ms: f64,
pub mean_exec_time_ms: f64,
pub min_exec_time_ms: f64,
pub max_exec_time_ms: f64,
pub rows_returned: u64,
pub cache_hit_ratio: Option<f64>,
pub database_specific: Value,
}Expand description
A single entry from the database’s query performance statistics.
Each entry represents aggregated execution metrics for one normalized
query (identified by query_id). The exact semantics of each field
depend on the underlying database, but all backends normalize into
this common shape.
Database-specific fields (e.g., PostgreSQL’s shared_blks_hit) are
available in database_specific as a free-form JSON value.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.query_id: StringOpaque identifier for the normalized query (e.g., PG queryid).
query_text: StringThe normalized query text (parameters replaced with placeholders).
calls: u64Total number of times this query has been executed.
total_exec_time_ms: f64Total execution time across all calls, in milliseconds.
mean_exec_time_ms: f64Mean execution time per call, in milliseconds.
min_exec_time_ms: f64Minimum execution time observed, in milliseconds.
max_exec_time_ms: f64Maximum execution time observed, in milliseconds.
rows_returned: u64Total rows returned across all calls.
cache_hit_ratio: Option<f64>Cache/buffer hit ratio (0.0–1.0), if available from the backend.
database_specific: ValueAdditional backend-specific statistics as free-form JSON.
Trait Implementations§
Source§impl Clone for QueryStatEntry
impl Clone for QueryStatEntry
Source§fn clone(&self) -> QueryStatEntry
fn clone(&self) -> QueryStatEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more