Release Date: November 05, 2025
This release brings dramatic performance improvements to window functions through our new batch evaluation engine. Complex analytical queries now run up to 86% faster on large datasets!
- Major Performance Boost: 86% improvement for window functions
- New Functions: RANK and DENSE_RANK window functions
- Smart Optimization: Automatic O(n) algorithms for cumulative patterns
- Zero Configuration: All improvements enabled by default
- 50,000 rows with LAG: 2.24s β 350ms (86% improvement!)
- Cumulative SUM: Previously timing out β Now 338ms
- All window functions now use optimized batch evaluation by default
- β
Window aggregates:
SUM,AVG,MIN,MAX,COUNT,FIRST_VALUE,LAST_VALUE - β
Positional functions:
LAG,LEAD,ROW_NUMBER - β
Ranking functions:
RANK,DENSE_RANK(newly implemented!) - β Smart O(n) algorithms for cumulative patterns
-- This query is now 86% faster!
SELECT
sale_date,
amount,
SUM(amount) OVER (ORDER BY sale_date ROWS UNBOUNDED PRECEDING) as running_total,
AVG(amount) OVER (ORDER BY sale_date ROWS 30 PRECEDING) as moving_avg_30,
LAG(amount, 1) OVER (ORDER BY sale_date) as prev_amount,
RANK() OVER (ORDER BY amount DESC) as sales_rank
FROM sales
ORDER BY sale_date;- Batch Evaluation: Process all rows in a single pass instead of per-row evaluation
- Hash-Based Caching: Pre-create and cache WindowContext objects (50,000 lookups β 1)
- Running Aggregates: O(n) incremental calculation for UNBOUNDED PRECEDING frames
- Smart Detection: Automatically optimizes cumulative and running total patterns
- Batch evaluation is enabled by default - no configuration needed!
- To opt-out (not recommended): Set
SQL_CLI_BATCH_WINDOW=0 - Complex expressions automatically use the optimal evaluation strategy
- Fixed window aggregate functions (AVG) returning incorrect results in certain cases
- Fixed Python test suite warnings about test functions returning values
- Fixed expression evaluation for window functions embedded in calculations
View all commits
- feat: Make batch window evaluation the default and fix expression handling
- fix: Update Python tests to use assertions instead of return values
- feat: Optimize window aggregates for UNBOUNDED PRECEDING frames
- feat: Implement batch evaluation for window functions - 86% performance improvement!
- feat: Window function optimization Phase 2 + Step 0 prep for batch evaluation
- feat: Add Phase 1 window function profiling infrastructure
- Window Functions: Now with 86% better performance!
- Instant Data Preview: CSV/JSON files load immediately
- Advanced SQL: CTEs, subqueries, window functions, aggregates
- Powerful Search: Regular search (Ctrl+F), fuzzy filter (Ctrl+/)
- Data Export: Save as CSV or JSON
- Vim Navigation: Full vim-style key bindings
cargo install sql-cliOr download the binary for your platform from the assets below.
Highly recommended upgrade for anyone using window functions, especially on large datasets. The performance improvements are substantial and all existing queries will automatically benefit.
Thank you for using SQL CLI! π
Report issues: GitHub Issues Full changelog: CHANGELOG.md