V2 - Tdb

-- Retention CREATE RETENTION POLICY raw ON fleet DURATION 7d REPLICATION 1; CREATE RETENTION POLICY hour ON fleet DURATION 365d; -- Downsample automatically CREATE CONTINUOUS QUERY auto_downsample ON fleet BEGIN SELECT mean(temp) AS temp_avg, max(temp) AS temp_max INTO fleet.hour.:measurement FROM fleet.raw.:measurement GROUP BY time(1h), * END;

tdb2_ingest_points_total tdb2_query_duration_secondsquantile="0.99" tdb2_partitions_active tdb2_compaction_queue_length tdb2_disk_usage_bytesdata" tdb v2

curl http://localhost:8086/health # "status":"ok","version":"2.0.1" | Problem | Cause | Fix | |---------|-------|-----| | Memory explosion | Too many unique series | Reduce tag cardinality; enable series limit | | Slow queries over 7d+ | Missing downsampling | Create aggregate retention policy | | High disk usage | Compression disabled | Enable zstd or lz4 | | Data gaps | Out-of-order beyond window | Increase out_of_order_window | | Write timeouts | Small batch size | Batch writes; increase timeout to 10s | 11. Sample Use Case: IoT Fleet Monitoring Requirements: 50k vehicles × 20 metrics every 30 seconds → 1.2B points/day. Keep raw 7 days, hourly averages 1 year. -- Retention CREATE RETENTION POLICY raw ON fleet