setup-timescaledb-hypertables
Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table.\n\n**Trigger when user asks to:**\n-
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table.\n\nTrigger when user asks to:\n- Create or design SQL schemas/tables AND Timescale/TimescaleDB/TigerData/Tiger Cloud is available\n- Set up hypertables, compression, retention policies, or continuous aggregates\n- Configure partition columns, segment_by, order_by, or chunk intervals\n- Optimize time-series database performance or storage\n- Create tables for sensors, metrics, telemetry, events, or transaction logs\n\nKeywords: CREATE TABLE, hypertable, Timescale, TimescaleDB, time-series, IoT, metrics, sensor data, compression policy, continuous aggregates, columnstore, retention policy, chunk interval, segment_by, order_by\n\nStep-by-step instructions for hypertable creation, column selection, compression policies, retention, continuous aggregates, and indexes.
How to use
Zainstaluj umiejętność w swoim agencie Claude/Copilot, wskazując repozytorium GitHub timescale/pg-aiguide. Upewnij się, że masz dostęp do PostgreSQL 15+ z zainstalowanym TimescaleDB.
Aktywuj umiejętność, gdy planujesz utworzyć tabelę dla danych szeregów czasowych — na przykład gdy chcesz przechowywać dane sensorów, metryki systemowe, logi zdarzeń lub transakcje. Umiejętność automatycznie się uruchomi, gdy wspomniasz o TimescaleDB, hipertabelach lub optymalizacji wydajności dla insert-heavy tabel.
Opisz swoją strukturę danych: wskaż kolumnę czasową (TIMESTAMPTZ), identyfikator encji (device_id, user_id, symbol), kategorie i wartości liczbowe. Umiejętność wygeneruje polecenie CREATE TABLE z prawidłową konfiguracją hipertabeli.
Skonfiguruj polityki kompresji i retencji — określ, które kolumny powinny być kompresowane i jak długo przechowywać dane. Umiejętność dostarczy instrukcje SQL do ustawienia compression policy i retention policy.
Zdefiniuj agregacje ciągłe (continuous aggregates) dla prekomputowanych statystyk — średnie, sumy, liczniki w określonych interwałach czasowych. Umiejętność wygeneruje odpowiednie zapytania CREATE MATERIALIZED VIEW.
Skopiuj wygenerowany kod SQL do swojej bazy danych. Umiejętność dostarcza gotowe polecenia do wykonania — wystarczy uruchomić je w PostgreSQL z włączonym TimescaleDB.