is_simple_point_query

Function is_simple_point_query 

Source
pub fn is_simple_point_query(stmt: &SelectStmt) -> bool
Expand description

Check if a query is a simple point-lookup that can use the fast path

Returns true for queries that:

  1. Query a single table (no joins, no subqueries in FROM)
  2. Have no WITH clause (CTEs)
  3. Have no aggregates or window functions
  4. Have no GROUP BY, HAVING, DISTINCT, or set operations
  5. Have no ORDER BY with complex expressions
  6. Have a simple WHERE clause (only AND-connected equality predicates)