polardbx-ttl20
Installation
SKILL.md
PolarDB-X TTL 2.0 — Cold Data Archiving & Auto-Add Range Partitions
Generate correct TTL (Time-to-Live) definitions and archive table statements for PolarDB-X 2.0 Enterprise Edition (AUTO mode). This skill covers two scenarios:
- Cold data archiving / data expiration: Analyzes table schemas, recommends row-based or partition-based archiving strategy, produces production-ready SQL.
- Auto-add Range partitions (add-only, no cleanup): Configures TTL mechanism to automatically pre-create future Range partitions, preventing write failures.
Scope: PolarDB-X 2.0 Enterprise Edition + AUTO mode database only.
⚠️ CRITICAL: Read the Reference Guide First
You MUST read the relevant reference guide in full BEFORE generating any SQL:
- TTL archiving / data expiration: references/ttl20-user-guide.md
- Auto-add Range partitions only: references/auto-add-range-parts.md
TTL syntax is unique to PolarDB-X and cannot be guessed from MySQL knowledge. Answering from memory WILL produce incorrect syntax.