Skip to content

Document live views#479

Open
puzpuzpuz wants to merge 3 commits into
mainfrom
puzpuzpuz_live_view
Open

Document live views#479
puzpuzpuz wants to merge 3 commits into
mainfrom
puzpuzpuz_live_view

Conversation

@puzpuzpuz

@puzpuzpuz puzpuzpuz commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Documents the new live view feature from questdb/questdb#6939 (OSS) and questdb/questdb-enterprise#1087 (Enterprise). A live view incrementally maintains a window-function query over a single WAL-backed base table and can be queried like a regular table.

New pages:

  • concepts/live-views.md: what live views are and why, how they work (refresh vs flush cadences, in-memory tier, freshness model), supported window functions, anchored windows, backfill, base-table lifecycle, monitoring, limitations, tradeoffs, and Enterprise features (permissions, replication, backup/restore).
  • query/sql/create-live-view.md: CREATE LIVE VIEW reference covering FLUSH EVERY, IN MEMORY, PARTITION BY, BACKFILL, anchored windows, query constraints, and error messages.
  • query/sql/drop-live-view.md: DROP LIVE VIEW reference.
  • configuration/live-views.md: the cairo.live.view.* server settings.

Updated pages:

  • query/functions/meta.md: adds the live_views() catalogue function and the L (live view) table_type discriminator.
  • query/sql/show.md: adds SHOW CREATE LIVE VIEW.
  • security/rbac.md: adds the CREATE LIVE VIEW and DROP LIVE VIEW permissions.
  • concepts/views.md, configuration/overview.md, operations/backup.md, sidebars.js: cross-links, index rows, and navigation.

Facts (config property names/defaults, live_views() columns, SHOW CREATE output, validation errors) were verified against the source on the puzpuzpuz_live_view branch of both repositories.

Follow-up (not in this PR)

The questdb/sql-parser grammar needs new keywords for web-console highlighting/autocomplete: live, flush, backfill, anchor, and daily (memory is already covered by open PR #27; every and view already exist).

Adds documentation for the new live view feature: incrementally maintained
window-function results over a single WAL-backed base table, queried like a
regular table.

New pages:
- concepts/live-views.md: what live views are, how they work (refresh vs
  flush cadences, in-memory tier, freshness), supported window functions,
  anchored windows, backfill, base-table lifecycle, monitoring, limitations,
  tradeoffs, and Enterprise features.
- query/sql/create-live-view.md: CREATE LIVE VIEW reference (FLUSH EVERY,
  IN MEMORY, PARTITION BY, BACKFILL, anchored windows, constraints, errors).
- query/sql/drop-live-view.md: DROP LIVE VIEW reference.
- configuration/live-views.md: cairo.live.view.* server settings.

Updated pages:
- query/functions/meta.md: live_views() catalogue function; table_type 'L'.
- query/sql/show.md: SHOW CREATE LIVE VIEW.
- security/rbac.md: CREATE LIVE VIEW / DROP LIVE VIEW permissions.
- concepts/views.md, configuration/overview.md, operations/backup.md,
  sidebars.js: cross-links, index rows, and navigation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

🚀 Build success!

Latest successful preview: https://preview-479--questdb-documentation.netlify.app/docs/

Commit SHA: a9eb6fc

📦 Build generates a preview & updates link on each commit.

@puzpuzpuz puzpuzpuz changed the title Document live views (OSS and Enterprise) Document live views Jul 9, 2026
@puzpuzpuz puzpuzpuz self-assigned this Jul 9, 2026
@puzpuzpuz puzpuzpuz added the documentation Improvements or additions to documentation label Jul 9, 2026
puzpuzpuz and others added 2 commits July 9, 2026 18:55
Address internal-contradiction and precision issues in the live-views pages,
verified against OSS PR questdb/questdb#6939:

- Relabel the comparison-table "Freshness control" row to "Freshness /
  durability"; FLUSH EVERY is a durability knob, not a freshness one.
- Make the flagship read example an unfiltered SELECT *, and note that
  timestamp-filtered reads trail by up to one FLUSH EVERY interval.
- Remove "truncating" from the base-table invalidation bullet: TRUNCATE is
  freeze-and-continue (walked past like DROP PARTITION / TTL), not an
  invalidation.
- Qualify the query constraint as a top-level ORDER BY; the window ORDER BY
  inside OVER(...) is required.
- Narrow "all view-level clauses precede AS" to the four pre-AS clauses; note
  OWNED BY follows the query.
- Add a note explaining the non-determinism error names "materialized view"
  because it reuses the shared guard (accurate server output).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
QuestDB's window-function docs name this capability EMA / VWEMA (modes of
avg()); "EWMA" appeared only here. Align the terminology for consistency
and searchability.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant