9.3.1
QuestDB 9.3.1
QuestDB 9.3.1 follows the major 9.3.0 release, focusing on stability, correctness, and performance refinements based on early feedback and production usage.
This release delivers targeted fixes across joins, views, and checkpointing, alongside continued performance improvements on hot SQL execution paths.
Improvements
Arithmetic expressions in window functions
Window functions now support arithmetic expressions directly, allowing analytical queries to compute derived values inline without requiring subqueries or post-processing:
SELECT
symbol,
price,
price - lag(price) OVER (PARTITION BY symbol ORDER BY ts) AS delta
FROM trades
This simplifies common patterns such as calculating deltas, ratios, and scaled values within window definitions.
Extended tables() metadata
The tables() system view now exposes two additional columns:
table_min_timestamptable_max_timestamp
These columns provide quick visibility into the temporal bounds of each table, useful for diagnostics, retention checks, and operational tooling.
ksum() window function
The ksum() function now works as a window function, using the Kahan summation algorithm for improved floating-point precision. This complements the existing ksum() aggregate function by enabling its use in window contexts:
-- Cumulative sum with reduced floating-point error
SELECT ksum(price) OVER (ORDER BY ts ROWS UNBOUNDED PRECEDING) FROM trades;
-- Sliding window
SELECT ksum(price) OVER (ORDER BY ts ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) FROM trades;
-- Partitioned
SELECT ksum(price) OVER (PARTITION BY symbol) FROM trades;
All standard window frame types are supported: ROWS, RANGE, partitioned, unbounded, and sliding windows.
Performance
Streaming Parquet export
Parquet exports via the HTTP /exp endpoint now stream directly from page frames, eliminating intermediate temporary tables. This reduces memory overhead and improves export throughput for large result sets.
Reduced garbage on parallel query hot paths
Parallel query execution has been optimized to reduce garbage generation on hot paths. This lowers GC pressure and improves throughput and tail latency under sustained analytical workloads.
Avoid repeated expression execution
Queries where columns reference other columns now avoid redundant expression evaluation. This improves performance for wide projections and queries with multiple derived columns.
Bug fixes
SQL and query execution
- Fixed an error when using
WINDOW JOIN(introduced in 9.3.0) withORDER BY ts DESC. - Fixed a crash in
ASOF JOINqueries when theONclause mixesSYMBOLand non-symbol columns. - Fixed transient "file does not exist" errors that could surface during query execution.
Views and materialized views
- Fixed an issue where views (introduced in 9.3.0) could become suspended after being altered.
- Fixed a rare bug that could write invalid data into a materialized view under specific conditions.
Core, storage, and checkpoints
- Fixed checkpoint restore logic by removing phantom table directories left on disk.
- Fixed a rare issue where process memory was not fully released on Linux when jemalloc is enabled.
Thanks to everyone who reported issues, shared production feedback, and contributed fixes and improvements. Your input continues to shape QuestDB's reliability and performance.
For questions or feedback, please join us on Slack or Discourse, and check the full changelog on GitHub for detailed PR information.
What's Changed
- feat(sql): implement ksum() window function with Kahan summation by @bluestreak01 in https://github.com/questdb/questdb/pull/6642
- perf(core): streaming parquet export by @kafka1991 in https://github.com/questdb/questdb/pull/6300
- feat(sql): implement arithmetic with window functions by @bluestreak01 in https://github.com/questdb/questdb/pull/6626
- fix(sql): WINDOW JOIN with ORDER BY ts DESC returns error by @puzpuzpuz in https://github.com/questdb/questdb/pull/6624
- fix(core): fix checkpoint restore by removing phantom tables directories from disk by @ideoma in https://github.com/questdb/questdb/pull/6614
- perf(sql): reduce garbage generated on parallel query hot path by @puzpuzpuz in https://github.com/questdb/questdb/pull/6597
- fix(sql): fix view metadata race conditions on replica by @bluestreak01 in https://github.com/questdb/questdb/pull/6627
- fix(core): fix for view becomes suspended after it is altered by @glasstiger in https://github.com/questdb/questdb/pull/6623
- fix(core): fix rare bug that can potentially write invalid data in mat view by @ideoma in https://github.com/questdb/questdb/pull/6628
- perf(sql): reduce repeated expression execution when a column is referenced by other columns by @kafka1991 in https://github.com/questdb/questdb/pull/6093
- fix(core): fix transient file does not exist error in queries by @ideoma in https://github.com/questdb/questdb/pull/6629
- fix(sql): fix ASOF JOIN crash when ON clause has symbol and other columns by @jerrinot in https://github.com/questdb/questdb/pull/6634
- fix(core): process memory may not be released on Linux when jemalloc is enabled by @puzpuzpuz in https://github.com/questdb/questdb/pull/6619
- feat(sql): add table_min_ and table_max_timestamp columns to tables() view by @bluestreak01 in https://github.com/questdb/questdb/pull/6630
Full Changelog: https://github.com/questdb/questdb/compare/9.3.0...9.3.1