Qdrant Sliding Time Window
QdrantOfficialPublished by Qdrant
- Skill
- Guidelines
- Data and AI
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This guide outlines strategies for managing time-based data in Qdrant, specifically for use cases where only recent data is relevant. It covers three primary approaches: shard rotation, collection rotation, and filter-and-delete. Each method is evaluated based on operational complexity, resource management, and performance implications, helping users choose the right architecture for their specific retention requirements.
What it does
- Explains shard rotation for efficient time-based data management.
- Details collection rotation using aliases for per-period configuration.
- Describes the filter-and-delete approach for continuous, simple cleanup.
- Provides guidance on implementing hot/cold storage tiers.
- Outlines common pitfalls to avoid during data rotation.
- Offers advice on indexing and performance optimization for time-series data.
When to use it
- When you need to expire old vectors based on time.
- When managing social media feeds, news search, or log retention.
- When you need to keep only the last N months of data.
- When you need to balance search performance with storage costs.
Advantages
- Shard rotation allows for instant resource reclamation without fragmentation.
- Collection rotation supports unique configurations for different time periods.
- Filter-and-delete provides a straightforward implementation for low-volume data.
- Hot/cold tiering optimizes performance by keeping recent data in RAM.
Usage examples
- “How do I keep only the last 30 days of logs in Qdrant?”
- The agent will recommend using shard rotation for efficient deletion and explain how to manage shard keys based on time periods.
- “I need to delete old vectors to save space, what is the best way?”
- The agent will compare the three strategies, suggesting shard rotation for high volume or filter-and-delete for simpler, lower-volume requirements.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/qdrant/qdrant-sliding-time-window/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip qdrant-sliding-time-window.zip -d .agents/skills
Documentation by Qdrant
Scaling with a Sliding Time Window
Use when only recent data needs fast search -- social media posts, news articles, support tickets, logs, job listings. Old data either becomes irrelevant or can tolerate slower access.
Three strategies: shard rotation (recommended), collection rotation (when per-period config differs), and filter-and-delete (simplest, for continuous cleanup).
Shard Rotation (Recommended)
Use when: data has natural time boundaries (daily, weekly, monthly). Preferred because queries span all time periods in one request without application-level fan-out. User-defined sharding
Create one shard key per time period, write to the current one, and delete the oldest shard key once it leaves the retention window. The Time-Based Sharding tutorial walks through the setup.
Deleting a shard key reclaims all resources instantly (no fragmentation, no optimizer overhead)
Pre-create the next period's shard key before rotation to avoid write disruption
Use
shard_key_selectorat query time to search only specific periods for efficiencyShard keys can be placed on specific nodes for hot/cold tiering
Collection Rotation (Alias Swap)
Use when: you need per-period collection configuration (e.g., different quantization or storage settings). Collection aliases
Create one collection per period behind a write alias, swap the alias to the new collection when a period starts Switch collection, and drop the oldest collection outside the window. Queries must fan out across all active collections in parallel and merge results client-side.
Trade-off vs shard rotation: allows per-collection config differences, but requires application-level fan-out and more operational overhead.
Filter-and-Delete
Use when: data arrives continuously without clear time boundaries, or you want the simplest setup.
Store the timestamp as a
datetimepayload on every point and index it Payload indexFilter to the desired window at query time with a datetime range condition Datetime range
Periodically delete expired points using delete-by-filter Delete points
Run cleanup during off-peak hours in batches (10k-50k points) to avoid optimizer locks
Deletes are not free: tombstoned points degrade search until optimizer compacts segments
Does not reclaim disk instantly (compaction is asynchronous)
Hot/Cold Tiers
Use when: recent data needs fast in-RAM search, older data should remain searchable at lower performance.
Shard rotation: place current shard key on fast-storage nodes, move older shard keys to cheaper nodes via shard placement. All queries still go through a single collection.
Collection rotation: keep the current collection's quantized vectors in RAM (
memory: pinnedon Qdrant 1.19 or newer,always_ram: trueon 1.18 or older) and its dense vectors in page cache (memory: cached, the default; Qdrant rejectspinnedfor dense vectors), move older collections to mmap/on-disk vectors (memory: coldon 1.19 or newer,on_disk: trueon 1.18 or older). Quantization
What NOT to Do
Do not use filter-and-delete for high-volume time-series with millions of daily deletes (use rotation instead)
Do not forget to index the timestamp field (range filters without an index cause full scans)
Do not use collection rotation when shard rotation would suffice (unnecessary fan-out complexity)
Do not drop a shard key or collection before verifying its period is fully outside the retention window
Do not skip pre-creating the next period's shard key or collection (write failures during rotation are hard to recover)
Files
- ATTRIBUTION.mdAdded by AutoGineer892 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md4.6 KiB
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "qdrant-sliding-time-window", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: 9f55f6a7fb225932da70c6e7dcd671c7e9a8929a
Published by: Qdrant (https://github.com/qdrant)
Publisher: Qdrant (https://github.com/qdrant)
Licence: Apache License 2.0 (https://github.com/qdrant/skills/blob/9f55f6a7fb225932da70c6e7dcd671c7e9a8929a/LICENSE)
Licence evidence: repository licence LICENSE
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from LICENSE
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Qdrant
- Publisher
- Qdrant (Official)
- Source
- qdrant/skills · skills/qdrant-scaling/scaling-data-volume/sliding-time-window · commit 9f55f6a
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Qdrant or Qdrant.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download qdrant-sliding-time-window.zip