Skip to content

Commit 80538c7

Browse files
glasstigerclaudejavierbluestreak01
authored
Add storage policy documentation (#414)
## Summary - Add new **Storage Policy** concept page (`concepts/storage-policy.md`) documenting the Enterprise feature for automated partition lifecycle management (convert to Parquet, drop native, drop local, drop remote) - Add new **ALTER TABLE SET STORAGE POLICY** SQL reference page (`query/sql/alter-table-set-storage-policy.md`) with full syntax, constraints, permissions, and examples - Add `STORAGE POLICY` clause documentation to the **CREATE TABLE** reference page - Update **data-retention.md** to list storage policies as a third retention approach alongside TTL and manual `DROP PARTITION` - Update **storage-engine.md** to reference storage policies for automatic Parquet conversion (replacing the previous object storage mention) - Add cross-reference from **TTL** concept page to the new storage policy docs - Register both new pages in `sidebars.js` ## Test plan - [x] Verify `yarn build` succeeds with no broken links - [x] Check sidebar navigation includes the new pages under Concepts and SQL Reference - [x] Confirm cross-links between storage policy, TTL, data retention, and CREATE TABLE pages resolve correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: javier ramírez <javier@questdb.io> Co-authored-by: Vlad Ilyushchenko <bluestreak@gmail.com>
1 parent ccf2c5d commit 80538c7

23 files changed

Lines changed: 1202 additions & 30 deletions

documentation/architecture/storage-engine.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ Older partitions (any partition other than the most recent one) can be converted
5555
Partitions in Parquet format remain fully available for queries. Users don't need to know whether a partition is in QuestDB
5656
binary format or Parquet format. All the data types available in QuestDB can be converted to Parquet.
5757

58-
When using QuestDB Enterprise, tables can be configured to convert to Parquet automatically and to send the Parquet
59-
files to object storage (Amazon S3, Microsoft Blob Storage, Google Cloud Storage, NFS...). This can help reduce the
60-
cost of storing historical data while keeping it fully available for queries.
58+
When using QuestDB Enterprise, tables can be configured to convert to Parquet automatically using
59+
[storage policies](/docs/concepts/storage-policy/). This can help reduce local disk usage
60+
while keeping historical data fully available for queries. Support for automatic upload
61+
of Parquet files to object storage will be added in a future release.
6162

6263

6364

documentation/concepts/materialized-views.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,16 @@ CREATE MATERIALIZED VIEW trades_hourly AS (
336336

337337
The view's TTL is independent of the base table's TTL.
338338

339+
:::note
340+
341+
In QuestDB Enterprise, TTL is superseded by
342+
[storage policies](/docs/concepts/storage-policy/). Use
343+
[`STORAGE POLICY(...)`](/docs/query/sql/alter-mat-view-set-storage-policy/) on
344+
a materialized view instead of `TTL` for graduated lifecycle management
345+
(convert to Parquet, then drop).
346+
347+
:::
348+
339349
### Initial refresh
340350

341351
When created, materialized views start an **asynchronous full refresh**:
@@ -592,6 +602,9 @@ the replica's view was not fully up-to-date.
592602
Sets the time limit for incremental refresh on a materialized view
593603
- [`ALTER MATERIALIZED VIEW SET TTL`](/docs/query/sql/alter-mat-view-set-ttl/):
594604
Sets the time-to-live (TTL) period on a materialized view
605+
- [`ALTER MATERIALIZED VIEW SET STORAGE POLICY`](/docs/query/sql/alter-mat-view-set-storage-policy/):
606+
Attaches a [storage policy](/docs/concepts/storage-policy/) to a
607+
materialized view (QuestDB Enterprise)
595608

596609
- **Configuration**
597610
- [Materialized views configs](/docs/configuration/overview/#materialized-views):

documentation/concepts/partitions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,5 @@ partition as a single unit.
189189
- [DETACH PARTITION](/docs/query/sql/alter-table-detach-partition/) — Move to cold storage
190190
- [ATTACH PARTITION](/docs/query/sql/alter-table-attach-partition/) — Restore detached data
191191
- [TTL](/docs/concepts/ttl/) — Automatic partition cleanup by age
192+
- [Storage Policy](/docs/concepts/storage-policy/) — Graduated partition
193+
lifecycle (convert to Parquet, then drop) in QuestDB Enterprise

0 commit comments

Comments
 (0)