TL;DR InfluxDB Tech Tips - Series Cardinality, DELETE Function & Moving Data with InfluxDB 0.13
Regan Kuchan /
May 04, 2016
Calculating your series cardinality
Q: Is series cardinality for a single measurement really just the product of the number of tag values per tag?
For example, I have a single measurement with the tags
firstname has 5 different values,
lastname has 5 different values, and
A: Series cardinality for a single measurement is actually the number of the tag sets that exist.
Working with your example, if we have the tags
lastname are dependent variables, and email is the independent variable, so your series cardinality is actually five.
If we then add
phone_number as another tag, that is a semi-independent variable. Any given email may be associated with zero or more phone numbers, and each number might be associated with more than one email (phone numbers get recycled over time.) Adding
phone_number will increase the series cardinality, but not in a purely multiplicative way. For most emails there will still be only one phone number, and vice versa.
Move data to a different database
Q: How can I move data from one database to another database in InfluxDB?
INTO query can copy data from one measurement or database to another. For example, move data from the measurement
initial_meas in the database old to the measurement
final_meas in the database
> SELECT * INTO new."default".final_meas FROM old."default".initial_meas
For more on
INTO queries, check out our documentation in Data Exploration.
New DELETE series functionality
Q: I’m having trouble removing some bad data. How can I delete data based on their timestamp?
A: In InfluxDB 0.13, users will be able to use
DELETE does not drop series from the index and it supports time intervals in the
WHERE clause. For example, delete all data in the database that occur before January 01, 2016:
> DELETE WHERE time < '2016-01-01'
InfluxDB 0.13 is available in the nightly downloads.