본문으로 건너뛰기
Skillpedia
데이터베이스40k · #7367

qdrant-sliding-time-window

하는 일

이 도구는 소셜 미디어 게시물이나 뉴스처럼 시간에 따라 변하는 데이터를 관리하도록 돕습니다. 최근 정보만 빠르고 쉽게 찾을 수 있게 하고, 오래된 데이터는 느리게 접근하거나 삭제할 수 있게 합니다.

사용하는 경우

  • ✓소셜 네트워크에서 최근 게시물만 검색하고 싶을 때.
  • ✓오래된 뉴스 기사를 자동으로 삭제해야 할 때.
  • ✓시스템 로그를 최근 몇 달만 남기도록 정리하고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/scaling-data-volume/sliding-time-window/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/qdrant-scaling/scaling-data-volume/sliding-time-window/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“뉴스 검색에서 지난주 기사만 보이게 하려면 어떻게 해야 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 데이터를 시간 '창(window)'으로 정리합니다. 오래된 데이터를 느린 저장소로 옮기거나 삭제하고, 최근 데이터는 항상 빠르게 접근할 수 있게 유지합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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

  1. Create a collection with user-defined sharding enabled
  2. Create one shard key per time period (e.g., 2025-01, 2025-02, ..., 2025-06)
  3. Ingest data into the current period's shard key
  4. When a new period starts, create a new shard key and redirect writes
  5. Delete the oldest shard key outside the retention window
  • 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_selector at query time to search only specific periods for efficiency
  • Shard 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

  1. Create one collection per time period, point a write alias at the newest
  2. Query across all active collections in parallel, merge results client-side
  3. When a new period starts, create the new collection and swap the write alias Switch collection
  4. Drop the oldest collection outside the window

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.

  1. Store a timestamp payload on every point, create a payload index on it Payload index
  2. Filter to the desired window at query time using range condition Range filter
  3. 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 current collection in RAM (always_ram: true), move older collections to mmap/on-disk vectors. 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)
자주 묻는 질문

시간별로 데이터를 정리하는 가장 좋은 방법은 무엇인가요?

샤드 회전(shard rotation)이 보통 권장됩니다. 추가 복잡성 없이 모든 기간에 걸쳐 빠른 검색이 가능하기 때문입니다.

오래된 데이터는 어떻게 되나요?

필요에 따라 느린 저장소로 옮기거나 완전히 삭제할 수 있습니다.

오래된 데이터를 삭제해도 안전한가요?

네, 이 도구는 오래된 데이터를 삭제하는 안전한 방법을 제공해, 중요한 정보는 계속 접근할 수 있도록 합니다.

상세 정보

작성자의 원본 설명

Guides sliding time window scaling in Qdrant. Use when someone asks 'only recent data matters', 'how to expire old vectors', 'time-based data rotation', 'delete old data efficiently', 'social media feed search', 'news search', 'log search with retention', or 'how to keep only last N months of data'.

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7367
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬