Repository navigation
docs(live-views): align live view docs with QuestDB 10.0.1 - #580
Merged
Merged
Conversation
Audit the live view pages against the 10.0.1 release and fix the mismatches: - Statistical window functions, EMA and VWEMA are only accepted in anchored windows; bounded ROWS/RANGE frames fail with "incremental snapshot is not supported". ksum rejects RANGE frames, lag needs a bounded frame or an anchor, and VARCHAR, UUID, LONG256 and DECIMAL partition keys are rejected. Add a rolling standard deviation (Bollinger bands) recipe built from bounded avg(). - Freshness: interval-filtered reads, aggregates and ASOF JOIN see unflushed rows; LATEST ON, dedup-base views and replica views do not. - Live views have their own refresh worker pool (live.view.refresh.worker.*), not the mat view pool. Document the pool and cairo.live.view.checkpoint.purge.interval, and fix the growth budget, compaction threshold, retry budget and memory limit descriptions. - live_views(): add checkpoint_seal_failures, fix lag_seqtxn, last_processed_seqtxn, lag_micros and writer_stall_micros. - CREATE LIVE VIEW: fix the OWNED BY example (query must be parenthesized), document the designated timestamp projection rule and the remaining anchor rules, and rewrite the error tables with the verified messages. - Add an ALTER LIVE VIEW RESUME WAL page, add the UPDATE and REBASE WAL invalidation triggers, and correct the mat view and WAL apply worker count defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The statement is intentionally undocumented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🚀 Build success! Latest successful preview: https://preview-580--questdb-documentation.netlify.app/docs/ Commit SHA: 93559fb
|
Concepts:
- Say that out-of-order base rows rewrite view rows already emitted
- Monitoring: lag is meaningful only for active views; a suspended view
WAL still shows active, with a query to find such views
- Give the sample stddev correction as SQL (integer division trap)
- Retention: dropping and recreating is the only way to reclaim space
- Scope the subquery/CTE rule to FROM; recovery recipe caveats for
START FROM NOW, trailing semicolons, and Enterprise OWNED BY
SQL reference:
- CREATE LIVE VIEW: { } grammar, anchored WINDOW grammar, RANGE/WHERE
and anchored session examples, corrected error causes, new rows,
OWNED BY rules for non-admin creators
- RESUME WAL: precise description and parameters, self-clearing
suspension on the next flush after a base commit
- Point ALTER TABLE RESUME WAL runbooks to the view-specific commands
- EMA/VWEMA reject a frame clause rather than ignoring it
- Mat view RESUME WAL needs the RESUME WAL permission
Configuration:
- Mat view and shared worker pool descriptions match 10.0.1 dedicated
pools and CPU-based defaults
- Anchor compaction applies only to TIMESTAMP anchors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
javier
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The live view docs listed
variance,stddev, covariance and correlation as supported, but 10.0.1 rejects them with bounded frames (incremental snapshot is not supported for this function yet). This PR fixes that and the other mismatches found by auditing every live view page, plus the pages that link to them, against the 10.0.1 code and a running 10.0.1 server.Window functions (concepts, CREATE LIVE VIEW)
ksumrejectsRANGEframes.lagneeds either a bounded frame or an anchor.VARCHAR,UUID,LONG256,DECIMAL,BINARYand array partition keys are rejected. Casting aVARCHARkey toSYMBOLavoids this.countdoes not acceptBINARYor array arguments.avg(). It matchesstddev_popon test data, and the sample variant is given as SQL becausen / (n - 1)is integer division in QuestDB.Freshness and lifecycle
ASOF/LT JOINright-hand sides all see unflushed rows.LATEST ON, views over dedup base tables, and views on Enterprise replicas, which have no in-memory lead.UPDATEon the base table (even of unreferenced columns),REBASE WAL, retry budget exhaustion, and columns used only inWHERE.DROP PARTITION/TRUNCATE/TTL on the base table neither reset window state nor remove view rows, so dropping and recreating the view is the only way to reclaim its disk space.SHOW CREATE LIVE VIEWoutput:START FROM NOWre-resolves, a trailing;breaks the replay, and the EnterpriseOWNED BYnames the caller.Monitoring
lag_seqtxnis meaningful only foractiveviews; it reads0while a view is still seeding.view_status = 'active'. The concepts page andlive_views()now say so and show how to find such views.ALTER TABLE ... RESUME WALfails on materialized and live views. TheALTER TABLE RESUME WALpage, the monitoring runbook and the WAL concept page now point to the view-specific commands, andwal_tables()lists live views.Configuration and
live_views()live.view.refresh.worker.*. The docs said they share the mat view pool. This PR documents the pool andcairo.live.view.checkpoint.purge.interval.TIMESTAMPanchorscheckpoint_seal_failurescolumn.lag_seqtxn(counts applied base txns, not committed),last_processed_seqtxn,lag_microsandwriter_stall_micros.mat.view.refresh.worker.countandwal.apply.worker.countdefaults. Both use the same CPU-based default, but neither drives the other.0disables mat view refresh rather than using the shared pool.SQL reference
CREATE LIVE VIEW:OWNED BYexample was broken; the query must be in parentheses. Documents who can be named as owner by non-admin creators.{ }grammar and adds a grammar for anchoredWINDOWclauses.RANGEframe with aWHEREfilter, and an anchored session window with ranking, EMA/VWEMA,lagand a bounded window alongside it.ALTER LIVE VIEW RESUME WALpage. The concepts page already referenced the statement. A suspension clears on the view's next flush after a base commit, so only views over an idle base table need it.ALTER MATERIALIZED VIEW RESUME WALrequires theRESUME WALpermission, notALTER MATERIALIZED VIEW.DROP LIVE VIEW,SHOW CREATE LIVE VIEWandSHOW CREATE DATABASE(LIVE_VIEWScategory): corrected error text and Enterprise wording.Possible engine issues found during the audit (not docs fixes):
ALTER LIVE VIEW ... SUSPEND WALis cleared by the view's next refresh, so it never pauses the view.PARTITION BYkey type or a missingPARTITION BY. That makes it hard to act on.row_number(), that error prints the Java class name instead of the function name.SHOW CREATE LIVE VIEW(and mat views) keep the creator's trailing;insideAS ( ... ), so the output fails to replay with')' expected.WHERE-clause subquery over another table (WHERE symbol IN (SELECT ... FROM other)) is accepted. It appears to be re-evaluated on each refresh with no dependency tracking on the other table; it should probably be rejected.o3_rejected_countdouble-counts: one late row below theSTART FROMboundary moved it from 0 to 2.invalidation_reasonmay be overwritten by later base DDL, and window inheritance (w2 AS (w ROWS 3 PRECEDING)) works in a plainSELECTbut fails in a live view.🤖 Generated with Claude Code