home / skills / 2025emma / vibe-coding-cn / timescaledb

timescaledb skill

/i18n/zh/skills/timescaledb

This skill helps you develop and optimize TimescaleDB solutions with hypertables, continuous aggregates, and real-time analytics through practical guidance.

npx playbooks add skill 2025emma/vibe-coding-cn --skill timescaledb

Review the files below or copy the command above to add this skill to your agents.

Files (15)
SKILL.md
2.9 KB
---
name: timescaledb
description: TimescaleDB - PostgreSQL extension for high-performance time-series and event data analytics, hypertables, continuous aggregates, compression, and real-time analytics
---

# Timescaledb Skill

Comprehensive assistance with timescaledb development, generated from official documentation.

## When to Use This Skill

This skill should be triggered when:
- Working with timescaledb
- Asking about timescaledb features or APIs
- Implementing timescaledb solutions
- Debugging timescaledb code
- Learning timescaledb best practices

## Quick Reference

### Common Patterns

*Quick reference patterns will be added as you use the skill.*

### Example Code Patterns

**Example 1** (bash):
```bash
rails new my_app -d=postgresql
    cd my_app
```

**Example 2** (ruby):
```ruby
gem 'timescaledb'
```

**Example 3** (shell):
```shell
kubectl create namespace timescale
```

**Example 4** (shell):
```shell
kubectl config set-context --current --namespace=timescale
```

**Example 5** (sql):
```sql
DROP EXTENSION timescaledb;
```

## Reference Files

This skill includes comprehensive documentation in `references/`:

- **api.md** - Api documentation
- **compression.md** - Compression documentation
- **continuous_aggregates.md** - Continuous Aggregates documentation
- **getting_started.md** - Getting Started documentation
- **hyperfunctions.md** - Hyperfunctions documentation
- **hypertables.md** - Hypertables documentation
- **installation.md** - Installation documentation
- **other.md** - Other documentation
- **performance.md** - Performance documentation
- **time_buckets.md** - Time Buckets documentation
- **tutorials.md** - Tutorials documentation

Use `view` to read specific reference files when detailed information is needed.

## Working with This Skill

### For Beginners
Start with the getting_started or tutorials reference files for foundational concepts.

### For Specific Features
Use the appropriate category reference file (api, guides, etc.) for detailed information.

### For Code Examples
The quick reference section above contains common patterns extracted from the official docs.

## Resources

### references/
Organized documentation extracted from official sources. These files contain:
- Detailed explanations
- Code examples with language annotations
- Links to original documentation
- Table of contents for quick navigation

### scripts/
Add helper scripts here for common automation tasks.

### assets/
Add templates, boilerplate, or example projects here.

## Notes

- This skill was automatically generated from official documentation
- Reference files preserve the structure and examples from source docs
- Code examples include language detection for better syntax highlighting
- Quick reference patterns are extracted from common usage examples in the docs

## Updating

To refresh this skill with updated documentation:
1. Re-run the scraper with the same configuration
2. The skill will be rebuilt with the latest information

Overview

This skill provides practical guidance for developing with TimescaleDB, the PostgreSQL extension optimized for time-series and event data. It highlights core features like hypertables, continuous aggregates, compression, and real-time analytics to help you design scalable, high-performance data pipelines. Use it to get actionable patterns, configuration tips, and example queries for common tasks.

How this skill works

The skill inspects TimescaleDB concepts and APIs and maps them to development and operational tasks, including schema design, hypertable creation, continuous aggregate setup, and compression rules. It surfaces code and CLI patterns, troubleshooting steps, and links to focused reference topics so you can implement features or resolve issues quickly. Use the included reference sections to dive into installation, performance tuning, and hyperfunctions when needed.

When to use it

  • Designing time-series schemas or migrating event streams into PostgreSQL
  • Creating and managing hypertables and continuous aggregates
  • Implementing compression to reduce storage costs and improve query speed
  • Tuning queries and indexes for high ingest rates and real-time analytics
  • Debugging TimescaleDB extensions, deployment, or configuration issues

Best practices

  • Model time-series data with a timestamp column and appropriate partitioning keys before creating hypertables
  • Use continuous aggregates to precompute heavy rollups and reduce query latency
  • Apply native compression on older chunks to save storage and speed scans while keeping recent data uncompressed for fast writes
  • Choose retention policies and automated jobs to manage historical data lifecycle
  • Monitor ingest throughput, chunk sizes, and planner statistics to balance performance and resource use

Example use cases

  • High-frequency metrics ingestion for observability platforms using hypertables
  • IoT sensor data pipeline with compression for long-term storage and continuous aggregates for dashboards
  • Financial tick data store with real-time queries and downsampled aggregates
  • Event-driven analytics where rollups are materialized continuously to serve SLAs
  • Kubernetes deployment recipes for TimescaleDB namespaces and extension lifecycle management

FAQ

Do I need a special client to use TimescaleDB?

No. TimescaleDB is a PostgreSQL extension, so any PostgreSQL client or driver works. Use SQL statements and extension commands to access TimescaleDB features.

When should I compress data?

Compress older, infrequently updated chunks to save storage and improve scan performance. Keep a window of recent chunks uncompressed for low-latency writes and queries.