Skip to main content

Module query_classification

Module query_classification 

Source
Expand description

Query Classification Cache

This module caches pre-computed characteristics of SELECT statements to avoid repeated AST traversals. For example, determining if a query has aggregation requires walking the entire SELECT column list - we cache this result.

§Performance Impact

Before: has_aggregation() called 3-5 times per query, each traversing all columns After: Single traversal on first access, O(1) lookup thereafter

Structs§

QueryClassification
Pre-computed characteristics of a SELECT statement.

Functions§

clear_classification_cache
Clear the classification cache. Call on database drop to release memory.
get_classification
Get or compute the classification for a SELECT statement