Differences Between InfluxDB 1.3 and 1.2

This page aims to ease the transition from InfluxDB 1.2 to InfluxDB 1.3. For a comprehensive list of the differences between the versions see InfluxDB’s Changelog.


TSI Release

Version 1.3.0 marked the first official release of InfluxDB’s new time series index (TSI) engine.

The TSI engine is a significant technical advancement in InfluxDB. It offers a solution to the time-structured merge tree engine’s high series cardinality issue. With TSI, the number of series should be unbounded by the memory on the server hardware and the number of existing series will have a negligible impact on database startup time. See Paul Dix’s blogpost Path to 1 Billion Time Series: InfluxDB High Cardinality Indexing Ready for Testing for additional information.

TSI is disabled by default in version 1.3. To enable TSI, uncomment the index-version setting and set it to tsi1. The index-version setting is in the [data] section of the configuration file. Next, restart your InfluxDB instance.

  dir = "/var/lib/influxdb/data"
  index-version = "tsi1"

Web Admin UI Removal

In version 1.3, the web admin interface is no longer available in InfluxDB. The interface does not run on port 8083 and InfluxDB ignores the [admin] section in the configuration file if that section is present. Chronograf replaces the web admin interface with improved tooling for querying data, writing data, and database management. See Chronograf’s transition guide for more information.

Duration Unit Updates

Duration units specify the time precision in InfluxQL queries and when writing data to InfluxDB. Version 1.3 introduces two updates to duration units.

InfluxDB now supports the nanosecond (ns) duration literal. The query below uses a GROUP BY time() clause to group averages into 1000000000 nanosecond buckets:

> SELECT MEAN("value") FROM "gopher" WHERE time >= 1497481480598711679 AND time <= 1497481484005926368 GROUP BY time(1000000000ns)

Version 1.3 also changes the way InfluxDB handles queries with an invalid duration unit. In versions prior to 1.3, the system ignored invalid duration units and did not return an error. In version 1.3, the system returns an error if the query includes an invalid duration unit. The following query erroneously specifies oranges as a duration unit:

> SELECT MEAN("value") FROM "gopher" WHERE time >= 1497481480598711679 AND time <= 1497481484005926368 GROUP BY time(2oranges)
ERR: error parsing query: invalid duration

InfluxQL Updates


Version 1.3 introduces several new mathematical operators. Follow the links below to learn more:


InfluxDB version 1.3 introduces two new functions and updates the behavior for the existing TOP() and BOTTOM() functions.

New function: INTEGRAL()

The INTEGRAL() function returns the area under the curve for subsequent field values. The query below returns the area under the curve (in seconds) for the field values associated with the water_level field key and in the h2o_feet measurement:

> SELECT INTEGRAL("water_level") FROM "h2o_feet" WHERE "location" = 'santa_monica' AND time >= '2015-08-18T00:00:00Z' AND time <= '2015-08-18T00:30:00Z'

name: h2o_feet
time                  integral
----                  --------
1970-01-01T00:00:00Z  3732.66

See the functions page for detailed documentation.


The NON_NEGATIVE_DIFFERENCE() function returns the non-negative result of subtraction between subsequent field values. Non-negative results of subtraction include positive differences and differences that equal zero. The query below returns the non-negative difference between subsequent field values in the water_level field key and in the h2o_feet measurement:

> SELECT NON_NEGATIVE_DIFFERENCE("water_level") FROM "h2o_feet" WHERE time >= '2015-08-18T00:00:00Z' AND time <= '2015-08-18T00:30:00Z' AND "location" = 'santa_monica'

name: h2o_feet
time                  non_negative_difference
----                  -----------------------
2015-08-18T00:06:00Z  0.052000000000000046
2015-08-18T00:18:00Z  0.09799999999999986
2015-08-18T00:30:00Z  0.010000000000000231

See the functions page for detailed documentation.

Updated functions: TOP() and BOTTOM()

Version 1.3 introduces three major changes to the TOP() and BOTTOM() functions:

  • The TOP() and BOTTOM() functions no longer support other functions in the SELECT clause. The following query now returns an error:
> SELECT TOP(value,1),MEAN(value) FROM "gopher"
ERR: error parsing query: selector function top() cannot be combined with other functions
  • The TOP() and BOTTOM() functions now maintain tags as tags if the query includes a tag key as an argument. The query below preserves location as a tag in the newly-written data:
> SELECT BOTTOM("water_level","location",2) INTO "bottom_water_levels" FROM "h2o_feet"
name: result
time                 written
----                 -------
1970-01-01T00:00:00Z 2

> SHOW TAG KEYS FROM "bottom_water_levels"
name: bottom_water_levels
  • The TOP() and BOTTOM() functions now preserve the timestamps in the original data when they’re used with the GROUP BY time() clause. The following query returns the points’ original timestamps; the timestamps are not forced to match the start of the GROUP BY time() intervals:
> SELECT TOP("water_level",2) FROM "h2o_feet" WHERE time >= '2015-08-18T00:00:00Z' AND time <= '2015-08-18T00:30:00Z' AND     "location" = 'santa_monica' GROUP BY time(18m)

name: h2o_feet
time                   top
----                   ------
2015-08-18T00:00:00Z  2.064 |
2015-08-18T00:06:00Z  2.116 | <------- Greatest points for the first time interval
2015-08-18T00:18:00Z  2.126 |
2015-08-18T00:30:00Z  2.051 | <------- Greatest points for the second time interval

Review the functions page for a complete discussion of the TOP() function and the BOTTOM() function.


Time zone clause

InfluxQL’s new time zone clause returns the UTC offset for the specified timezone. The query below returns the UTC offset for Chicago’s time zone:

    > SELECT "water_level" FROM "h2o_feet" WHERE "location" = 'santa_monica' AND time >= '2015-08-18T00:00:00Z' AND time <=      '2015-08-18T00:18:00Z' tz('America/Chicago')

    name: h2o_feet
    time                       water_level
    ----                       -----------
    2015-08-17T19:00:00-05:00  2.064
    2015-08-17T19:06:00-05:00  2.116
    2015-08-17T19:12:00-05:00  2.028
    2015-08-17T19:18:00-05:00  2.126

See the data exploration page for more information.

Continuous Queries

A defect was identified in the way that continuous queries were previously handling time ranges. The result of that defect is that for certain time scales larger than 1d, the continuous queries had their time ranges miscalculated and were run at the incorrect time.

This has been addressed – but this change may impact existing continuous queries which process data in time ranges larger than 1d. Additional details [can be found here].(https://github.com/influxdata/influxdb/issues/8569)

CLI non-admin user updates

In versions prior to v1.3, non-admin users could not execute a USE <database_name> query in the CLI even if they had READ and/or WRITE permissions on that database. Starting with version 1.3, non-admin users can execute the USE <database_name> query for databases on which they have READ and/or WRITE permissions. See the FAQ page for more information.

© 2015 InfluxData, Inc.
Licensed under the MIT license.