All Products
Search
Document Center

Time Series Database:Terms

Last Updated:Nov 01, 2023

This topic describes the terms that are used in TSDB for InfluxDB®.

aggregation

The aggregate functions that are supported by TSDB for InfluxDB®. The aggregate functions can be used to aggregate the values of a group of points. For information about all aggregate functions that are supported or will be supported by TSDB for InfluxDB®, see General syntax of functions.

Related terms: function, selector, and transformation.

batch

A collection of points that are specified in the line protocol format and separated with line feeds (0x0A). You can send an HTTP request to write a batch of points to a database. This way, the network overheads are reduced, and the performance of data writes by using the HTTP API is improved. We recommend that you specify 5,000 to 10,000 points in a batch. You can specify the batch size based on business scenarios to ensure the optimal performance.

Related terms: line protocol and point.

continuous query (CQ)

A type of query. A continuous query is automatically performed on a TSDB for InfluxDB® database at specific intervals. To perform a continuous query, you must include a function in the SELECT clause and specify a GROUP BY time() clause in the statement.

Related term: function.

database

A logical container for users, retention policies, continuous queries, and time series data.

Related terms: continuous query, retention policy, and user.

duration

An attribute for data retention policies. This attribute specifies the period of time for which data can be retained in a TSDB for InfluxDB® database. The system automatically deletes data that is stored for a longer period of time than the specified retention time.

Related term: retention policy.

field

Fields are key-value pairs in the data structure of TSDB for InfluxDB®. Fields are used to store metadata and actual data. Fields are required in the data structure of TSDB for InfluxDB® and are not indexed. If you specify a value of a field as a filter condition in a query statement, TSDB for InfluxDB® scans all points that are generated in the specified time range. The performance of queries that use fields as filter conditions is lower than the performance of queries that use tags as filter conditions.

Note: TSDB for InfluxDB® does not create indexes based on fields. TSDB for InfluxDB® creates indexes based on tags.

Related terms: field key, field set, field value, and tag.

field key

The key of a field. Field keys are strings that store metadata.

Related terms: field, field set, field value, and tag key.

field set

A collection of the field keys and field values in a point.

Related terms: field, field key, field value, and point.

field value

The value of a field. Field values are actual data. Field values can be strings, floating-point numbers, integers, or Boolean values. A field value is associated with a timestamp.

TSDB for InfluxDB® does not create indexes based on field values. If you specify a value of a field as a filter condition in a query statement, TSDB for InfluxDB® scans all points that are generated in the specified time range. As a result, the query performance is poor.

Note: TSDB for InfluxDB® does not create indexes based on field values. TSDB for InfluxDB® creates indexes based on tag values.

Related terms: field, field key, field set, tag value, and timestamp.

function

The aggregate functions, selector functions, and transformation functions that are supported by TSDB for InfluxDB®. For information about all functions that are supported by TSDB for InfluxDB®, see General syntax of functions.

Related terms: aggregation, selector, and transformation.

identifier

Tokens such as field keys, tag keys, usernames, and names of continuous queries, databases, measurements, and retention policies.

Related terms: database, field key, measurement, retention policy, tag key, and user.

line protocol

The text format in which you can specify the points that you want to import to a TSDB for InfluxDB® database.

measurement

A string in the data structure of TSDB for InfluxDB®. A measurement describes the data that is stored in a field.

Related terms: field and series.

metastore

A service that is used to store internal information including the status of the system. Metastore stores metadata of shards and information about users, databases, retention policies, and continuous queries.

Related terms: database, retention policy, and user.

node

A server of a TSDB for InfluxDB® instance.

Related term: server.

now()

The function that returns the current timestamp on the local server. The timestamp is in nanoseconds.

point

Points are included in the data structure of TSDB For InfluxDB®. A point consists of fields in a series. A point is identified by the series in which the point is stored and the timestamp of the point.

You cannot store multiple points whose timestamps are the same in a series. If you write a point to a series that includes another point whose timestamp is the same, the field set that corresponds to the timestamp becomes a union set of the previous field set and the new field set. When a request queries the point that contains the timestamp, the new field set is returned.

Related terms: field set, series, and timestamp.

points per second

The rate at which data is written to TSDB for InfluxDB® databases. This term is deprecated because the data schema of TSDB for InfluxDB® allows you to write values of multiple metrics per point.

Instead, the values per second metric is used to indicate the data writing rate.

Related terms: point, schema, and values per second.

query

An operation that can be performed to retrieve data from a TSDB for InfluxDB® database.

retention policy (RP)

The retention policy of a TSDB for InfluxDB® database is included in the data structure. The retention policy specifies the data retention period, and the duration of shard groups of the database. Each TSDB for InfluxDB® database uses a unique retention policy. A series can be identified by the retention policy, a measurement, and a tag set.

When you create a database in TSDB for InfluxDB®, the system automatically creates a retention policy named autogen for the database.

Related terms: duration, measurement, series, shard duration, and tag set.

schema

The schema of the data that is stored in a TSDB for InfluxDB® database. The schema describes how data is organized in the TSDB for InfluxDB® database. The schema contains information about the database, the retention policy, series, measurements, tag keys, tag values, and field keys.

Related terms: database, field key, measurement, retention policy, series, tag key, and tag value.

selector

The selector functions that can be used to select a point from a specified range of points. For information about all selector functions that are supported or will be supported by TSDB for InfluxDB®, see General syntax of functions.

Related terms: aggregation, function, and transformation.

series

A set of points that use the same measurement, tag set, and retention policy in a TSDB for InfluxDB® database.

Note

Field sets cannot be used to identify series.

Related terms: field set, measurement, retention policy, and tag set.

series cardinality

The number of combinations of databases, measurements, tag sets, and field keys in a TSDB for InfluxDB® instance.

For example, a TSDB for InfluxDB® instance contains a database and a measurement, and the measurement contains two tags: email and status. The email tag has three values and the status tag has two values. In this case, each email address is associated with two status values. The series cardinality of the measurement is calculated by using the following equation: 3 x 2 = 6.

email

status

username@alibaba-inc.com

start

username@alibaba-inc.com

finish

username@alibaba-inc.com

start

username@alibaba-inc.com

finish

username@alibaba-inc.com

start

username@alibaba-inc.com

finish

In specific cases, dependent tags are used. If you multiply the number of values of each tag, the estimated series cardinality may be excessive. A dependent tag is a tag whose value scope is included in the value scope of another tag. Dependent tags do not increase the series cardinality. For example, the firstname tag is added to the measurement that is described in the preceding example. The series cardinality of the measurement is not 18 (3 x 2 x 3 = 18). The series cardinality is 6 because the scope of the firstname tag is included in the scope of the email tag.

email

status

firstname

username@alibaba-inc.com

start

amy

username@alibaba-inc.com

finish

amy

username@alibaba-inc.com

start

jeff

username@alibaba-inc.com

finish

jeff

username@alibaba-inc.com

start

john

username@alibaba-inc.com

finish

john

Related terms: field key, measurement, tag key, and tag set.

server

A virtual server or physical server that runs a TSDB for InfluxDB® database.

Related term: node.

shard

A shard contains the actual data and compressed data of series. A shard consists of one or more Time-Structured Merge Tree (TSM) files that are stored on a disk. A shard belongs to only one shard group. A shard group can include multiple shards. Each shard contains data of a specific set of series. In a specific shard group, all points in a series are stored in the same shard. This way, all points in a series are stored in the same TSM file.

Related terms: series, shard duration, shard group, and TSM.

shard duration

The period of time that is covered by each shard group. The duration is specified by the SHARD DURATION parameter in the retention policy of a database.

For example, if the value of the SHARD DURATION parameter in the retention policy is set to 1w, each shard group covers one week and contains all points that are generated within the week.

Related terms: database, retention policy, series, shard, and shard group.

shard group

A shard group is a logical container for shards. The shards in a shard group are organized by time and retention policy. The retention policy of a database that contains data must be associated with at least one shard group. The shards in a shard group contain all data that is generated within a specific period of time. The period of time is the shard duration.

Related terms: database, retention policy, series, shard, and shard duration.

tag

A tag is a key-value pair that stores metadata in the data structure of a TSDB for InfluxDB® database. Tags are optional in the data structure of a TSDB for InfluxDB® database. The performance of queries that are performed based on tags is high because tags are indexed in TSDB for InfluxDB® databases. You can use tags to store the metadata that is frequently accessed.

Note: TSDB for InfluxDB® creates indexes based on tags.

Related terms: field, tag key, tag set, and tag value.

tag key

The key of a tag. Tag keys are strings that store metadata. The performance of queries that are performed based on tag keys is high because tag keys are indexed in TSDB for InfluxDB® databases.

Note: TSDB for InfluxDB® creates indexes based on tag keys.

Related terms: field key, tag, tag set, and tag value.

tag set

A collection of tag keys and tag values in a point.

Related terms: point, series, tag, tag key, and tag value.

tag value

The value of a tag. Tag values are strings that store metadata. The performance of queries that are performed based on tag values is high because tag values are indexed in TSDB for InfluxDB® databases.

Related terms: tag, tag key, and tag set.

timestamp

The date and time that are associated with a point. Timestamps in TSDB for InfluxDB® databases are in UTC.

For information about how to specify a timestamp for the data that you want to write to a TSDB for InfluxDB® database, see Write Protocol. Overview Of Data Exploration

Related term: point.

transformation

The transformation functions that can be used to calculate a specific set of points and return a value or a set of values. These functions do not return the aggregated value of points. For information about all functions that are supported or will be supported by TSDB for InfluxDB®, see General syntax of functions.

Related terms: aggregation, function, and selector.

TSM

The format of the data that is stored in a TSDB for InfluxDB® database. TSM provides a higher compression rate and read and write throughput than the B+ tree or Log-Structured Merge Tree (LSM) tree.

user

TSDB for InfluxDB® supports two types of database users: the administrator and standard users.

  • The administrator is granted read and write permissions on all databases that are created in an instance and is also granted the required permissions to manage queries and users.

  • Standard users can be granted read-only permissions, write-only permissions, or read and write permissions on databases.

values per second

The rate at which data is written to a TSDB for InfluxDB® database. The values per second metric is used to describe the data writing rate.

To calculate the values per second, you can multiply the number of points that are written by the number of values that are stored in each point. For example, 10 batches are written to a database per second. Each batch contains 5,000 points, and each point contains four fields. In this case, the writing rate is calculated by using the following equation: 4 × 5,000 × 10 = 200,000.

Related terms: batch, field, point, and points per second.

Write Ahead Log (WAL)

The temporary cache that are used to store points. TSDB for InfluxDB® caches new points that are written to databases in WAL. When the volume of the data that is stored in WAL exceeds the specific threshold or the points are stored in WAL for a longer period of time than the specified duration, the points are flushed to databases for persistent storage. This reduces the frequency with which the system scans the permanent files. WAL allows you to effectively write data to TSM in batches.

Points that are stored in WAL can be queried. After you restart the system, the data that is stored in WAL is retained. When a TSDB for InfluxDB® process is started, all points that are stored in WAL are flushed to the permanent storage before new write requests are processed.

Related term: TSM.