Table of content
  1. Tuning
    1. Recommanded durations
  2. Commands

Installing a InfluxDB server

Build information

Ensure the following options:

databases/influxdb
1
[x] MANPAGES        Build and/or install manual pages

Tuning

Recommanded durations

Retention policy Shard group
<= 1 day 6 hours
> 1 day and <= 7 days 1 day
> 7 days and <= 3 months 7 days
> 3 months 30 days
infinite 52 weeks or longer

Commands

Create database
1
2
3
4
CREATE DATABASE "db-name"
       WITH DURATION 0s
            SHARD DURATIION 52w
            NAME "historical"
1
CREATE DATABASE "db-name"
Downsampling continous query
1
2
3
4
5
6
CREATE CONTINUOUS QUERY "cq_30m" ON "food_data" BEGIN
  SELECT mean("website") AS "mean_website",mean("phone") AS "mean_phone"
  INTO "a_year"."downsampled_orders"
  FROM "orders"
  GROUP BY time(30m)
END
Show retention policies
1
SHOW RETENTION POLICIES ON "db-name"
Add retention policies
1
2
CREATE RETENTION POLICY "policy-name" ON "db-name"
       DURATION 0s REPLICATION 1 SHARD DURATION 52w