```sql CREATE TABLE orders ( order_id INT, customer_id INT, amount DECIMAL ) PARTITION BY RANGE (YEAR(created_at)) ( PARTITION p2024 VALUES LESS THAN (2025), PARTITION p2025 VALUES LESS THAN (2026), PARTITION p2026 VALUES LESS THAN (2027) ); ```
Scanned 9/10/2026
Install to Claude Code
npx -y skills add snoodleboot-io/prompticorn --skill minimal --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Minimal?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/snoodleboot-io-minimal-82766f6d)More formats (shields.io, HTML) on the badges page.
# Data Partitioning (Minimal)
## Key Strategies
### Time-Based Partition
```sql
CREATE TABLE orders (
order_id INT,
customer_id INT,
amount DECIMAL
) PARTITION BY RANGE (YEAR(created_at)) (
PARTITION p2024 VALUES LESS THAN (2025),
PARTITION p2025 VALUES LESS THAN (2026),
PARTITION p2026 VALUES LESS THAN (2027)
);
```
Benefits: Quick date-range queries, easy archival
### Range Partition
```sql
CREATE TABLE events (
event_id INT,
user_id INT
) PARTITION BY RANGE (user_id) (
PARTITION p1 VALUES LESS THAN (1000000),
PARTITION p2 VALUES LESS THAN (2000000),
PARTITION p3 VALUES LESS THAN (MAXVALUE)
);
```
### List Partition
```sql
PARTITION BY LIST (region) (
PARTITION p_us VALUES IN ('US-EAST', 'US-WEST'),
PARTITION p_eu VALUES IN ('EU-WEST', 'EU-CENTRAL'),
PARTITION p_apac VALUES IN ('APAC-EAST', 'APAC-SOUTH')
);
```
## Query Performance
- Partition pruning: Only scan relevant partition
- 10B rows split into 10 partitions = 1B rows per partition
- Queries 10x faster
## Maintenance
- Archive old partitions (2020 data to cold storage)
- Add new partitions automatically
- Monitor partition sizes
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
MySQL development best practices for schema design, query optimization, and database administration
基于Supabase最佳实践的PostgreSQL数据库模式,用于查询优化、架构设计、索引和安全。
Spring Boot中的JPA/Hibernate实体设计、关系、查询优化、事务、审计、索引、分页和连接池模式。
ClickHouse数据库模式、查询优化、分析和数据工程最佳实践,适用于高性能分析工作负载。
Unify 6+ memory systems into AgentDB with HNSW indexing for 150x-12,500x search improvements. Implements ADR-006 (Unified Memory Service) and ADR-009 (Hybrid Memory Backend).