pub struct QueryConfig {
pub max_execution_time: Duration,
pub forced_read_path: Option<ReadPathMode>,
pub max_result_rows: u64,
pub max_result_bytes: u64,
pub plan_cache_size: usize,
pub enable_optimization: bool,
pub parallel: ParallelQueryConfig,
pub query_cache_size: Option<usize>,
pub query_parallelism: Option<usize>,
pub analyze_iterations: Option<usize>,
}Expand description
Query engine configuration
Fields§
§max_execution_time: DurationMaximum query execution time
forced_read_path: Option<ReadPathMode>Force the SELECT access-path decision (issue #1918).
None (the default) leaves routing to the per-query classifier and the
CQLITE_READ_PATH env knob; Some(mode) forces that mode and takes
precedence over the env var. A test/debug control — see
ReadPathMode. #[serde(default)] keeps configs serialized before this
field existed deserializing successfully (absent = None).
max_result_rows: u64Maximum number of rows to return in a result set.
A secondary safety valve, retained for defense-in-depth (issue #1582).
The primary guard on a materialized result is now max_result_bytes: a
row count is the wrong unit because 1M skinny rows can fit comfortably
while 100k wide rows blow the <128MB memory target. Still load-bearing:
the materializing SELECT path enforces this row-count ceiling alongside
the byte budget (lowering it makes a wide-row-count result trip even
under the byte budget), so it is a real knob, not decoration.
max_result_bytes: u64Byte ceiling on a MATERIALIZED result set (issue #1582 / D6).
While the SELECT executor collects a materialized Vec<QueryRow>, it
tracks a running estimate of the result’s logical size (via the shared
crate::memory::estimate_value_size estimator) and fails with
crate::Error::ResultTooLarge once this ceiling is crossed — telling
the caller to add a LIMIT or use the streaming API. This is the
correct-unit primary guard; max_result_rows remains as a secondary
valve. Streaming queries are bounded by their channel buffer, so this
budget does not apply to them.
Default: DEFAULT_MAX_RESULT_BYTES (64 MiB). Chosen well below the
project’s <128MB process memory target: the estimator measures logical
content bytes and does not count per-row container overhead
(HashMap<Arc<str>, Value> slots, String/Vec capacity slack, row
metadata), which in practice roughly doubles real heap use — so a 64 MiB
logical ceiling keeps a fully-materialized result comfortably inside the
process budget while leaving headroom for readers, caches, and decode
buffers.
plan_cache_size: usizeQuery plan cache size
enable_optimization: boolEnable query optimization
parallel: ParallelQueryConfigParallel query execution configuration
query_cache_size: Option<usize>Query cache size (for plan caching)
query_parallelism: Option<usize>Query parallelism thread count
analyze_iterations: Option<usize>Number of iterations for query analysis
Trait Implementations§
Source§impl Clone for QueryConfig
impl Clone for QueryConfig
Source§fn clone(&self) -> QueryConfig
fn clone(&self) -> QueryConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more