This document mainly introduces the time series database InfluxDB®A common term for the edition.
An Influx Query Language (InfluxQL) function that returns an aggregated value across a set of points.
Related terms: function,selector,transformation.
A collection of points that are separated by line feeds (
0x0A) and conform to the line protocol format. You can use a single HTTP request to write a batch of points to a database. This greatly reduces the HTTP overhead and improves the performance of data writing through the HTTP API. For Time Series Database (TSDB) for InfluxDB® instances, we recommend batch sizes of 5,000 to 10,000 points. You can adjust the batch size to achieve better performance in different scenarios.
Related terms: line protocol,point.
Continuous Query (CQ)
An InfluxQL query that automatically and periodically runs in a database. Continuous queries require a function in the
SELECT clause and must include a
GROUP BY time() clause.
Related term: function.
A logical container for users, retention policies (RPs), continuous queries, and time series data.
Related terms: continuous query,retention policy,user.
An attribute of a retention policy that determines how long TSDB for InfluxDB® stores data. Data generated before the duration is automatically deleted from the database.
Related term: retention policy.
A key-value pair that records the metadata and actual data in the data structure of TSDB for InfluxDB®. Fields are required in the data structure of TSDB for InfluxDB® and are not indexed. If you use a field value as a query condition, all points in the selected period must be scanned. This is not as efficient as a tag-based query.
Tip: Tags are indexed in the database. Therefore, tag-based queries are more efficient.
Related terms: field key,field set,field value,tag.
The key in the key-value pair of a field. A field key is a string and stores metadata.
Related terms: field,field set,field value,tag key.
The collection of field keys and field values on a point.
Related terms: field,field key,field value,point.
The value in the key-value pair of a field. A field value is the actual data that can be a string, a floating-point number, an integer, or a Boolean value. A field value is always associated with a timestamp.
A field value is not indexed in a database. If the field value is used as a query condition, all points in the selected period must be scanned. This makes the query inefficient.
Tip: Tag values are indexed in the database. Therefore, tag value-based queries are more efficient.
Related terms: field,field key,field set,tag value,timestamp.
InfluxQL aggregations, selectors, and transformations.
Related terms: aggregation,selector,transformation.
Tokens that refer to continuous query names, database names, field keys, measurement names, retention policy names, subscription names, tag keys, and user names. For more information, see InfluxQL reference.
Related terms: database,field key,measurement,retention policy,tag key,user.
The text format for writing points to TSDB for InfluxDB®. For more information, see Line protocol.
A part of the data structure of TSDB for InfluxDB® that describes the data stored in related fields. The value of a measurement is a string.
Related terms: field,series.
The internal information that contains the system status. The metastore contains the user information, databases, retention policies, shard metadata, and continuous queries.
Relevant terms: database, retention policy, and user.
An independent TSDB for InfluxDB® instance.
Relevant terms: server.
The current nanosecond-level timestamp of the local server.
A part in the data structure of TSDB for InfluxDB®, which consists of fields contained in a series. Each point is uniquely identified by its series and timestamp.
You cannot store multiple points that have the same timestamp in a series. If you write a point whose timestamp is the same as that of an existing point in the series, the field set of the timestamp changes to the union of the old and new field sets, and the union is returned when this point is queried.
Relevant terms: field set, series, and timestamp.
Points per second
This term has been deprecated. It was used to measure the rate at which data is written to TSDB for InfluxDB®. The schema of TSDB for InfluxDB® allows or even encourages the recording of multiple metric values per point. Therefore, this term is ambiguous.
Values per second is a more precise metric that is now used to represent the data writing rate.
Relevant terms: point, schema, and values per second.
From TSDB For InfluxDB®The operation to obtain data in.
An attribute of a retention policy that determines the number of data replicas stored in a cluster. If TSDB for InfluxDB® replicates data on
N is the replication factor.
The replication factor does not apply to single-node instances.
Related terms: duration,node,retention policy.
A part in the data structure of TSDB for InfluxDB®, which describes how long the database keeps data (duration), how many data replicas to store in the cluster (replication factor), and the time range covered by shard groups (shard duration). A retention policy is unique in each database. A retention policy, a measurement, and a tag set define a series.
When you create a database, TSDB For InfluxDB® creates a retention policy named
The replication factor does not apply to single-node instances.
Related terms: duration,measurement,replication factor,series,shard duration,tag set.
A schema describes how data is organized in TSDB for InfluxDB®. The schema of TSDB for InfluxDB® is based on the databases, retention policies, series, measurements, tag keys, tag values, and field keys.
Related terms: database,field key,measurement,retention policy,series,tag key,tag value.
An InfluxQL function that returns a point from certain points.
Related terms: aggregation,function,transformation.
A set of points that contain the same measurements, tag sets, and retention policies in the data structure of TSDB for InfluxDB®.
A field set does not identify any part of a series.
Related terms: field set,measurement,retention policy,tag set.
The number of combinations of different databases, measurements, tag sets, and field keys in a TSDB for InfluxDB® instance.
Assume that a TSDB for InfluxDB® instance has a database and a measurement, and the measurement has two tag keys:
status. If the
status tag values, the series cardinality of this measurement is 6 (3 x 2 = 6).
In some cases, if you simply perform the multiplication, the series cardinality may be overestimated due to dependent tags. A dependent tag is a tag whose range is restricted by another tag. It does not increase the series cardinality. If we add the
firstname tag in the preceding example, the series cardinality does not become 18 (3 x 2 x 3 = 18). Instead, it remains 6 because
firstname has been overwritten by
Related terms: field key,measurement,tag key,tag set.
A virtual machine or physical machine that runs TSDB for InfluxDB®.
Related term: node.
A shard contains the actual encoded data and compressed data and is represented by a Time-Structured Merge Tree (TSM) file on a disk. Each shard belongs to only one shard group. Multiple shards may exist in a single shard group. Each shard contains a specific set of series. All points in a series in a given shard group are stored in the same shard (TSM file) on a disk.
Related terms: series,shard duration,shard group,tsm.
A shard duration determines how long each shard group spans. The specific duration is determined by
SHARD DURATION in the retention policy.
For example, if
SHARD DURATION in the retention policy is set to
1w, each shard group spans for a week and contains all points of the week.
Related terms: database,retention policy,series,shard,shard group.
Shard groups are logical containers for shards and are organized by time and retention policy. Each retention policy that contains data must contain at least one associated shard group. A shard group contains all shards that have data that is generated within the duration spanned by the shard group. This duration refers to the shard duration.
Related terms: database,retention policy,series,shard,shard duration.
The key-value pair that records metadata in the data structure of TSDB for InfluxDB®. Tags are optional in the data structure of TSDB for InfluxDB®. Tags are indexed in a database. Therefore, you can improve the query performance by using tags to store frequently queried metadata.
Tip: Fields are not indexed in a database.
Related terms: field,tag key,tag set,tag value.
The key in the key-value pair of a tag. A tag key is a string and stores metadata. Tag keys are indexed in a database. Therefore, queries based on tag keys are efficient.
Tip: Field keys are not indexed in a database.
Related terms: field key,tag,tag set,tag value.
The collection of tag keys and tag values on a point.
Related terms: point,series,tag,tag key,tag value.
The value in the key-value pair of a tag. A tag value is a string and stores metadata. Tag values are indexed in a database. Therefore, queries based on tag values are efficient.
Related terms: tag,tag key,tag set.
The date and time associated with a point. TSDB for InfluxDB® uses the UTC+0 time zone.
For how to specify the time when data is written, you can view the write protocol.
Related term: point.
An InfluxQL function that returns a value or a value set computed at specific points, but not an aggregated value of these points.
Related terms: aggregation,function,selector.
Time Structured Merge Tree (TSM)
The dedicated data storage format of TSDB for InfluxDB®. Compared with the implementation of the B+ tree or log structured merge tree (LSM tree), TSM provides better compression and higher write and read throughput.
TSDB for InfluxDB® has two types of users:
Admin users have read and write permissions on all databases, and all permissions to manage queries and users.
Non-admin users have read-only, write-only, or read and write permissions on databases.
Values per second
The preferred measurement of the rate at which data is written to TSDB For InfluxDB®. The write rate is usually quoted in values per second.
To calculate the values per second rate, multiply the number of points written per second by the number of values stored for each point. For example, if a batch containing 5,000 points is written 10 times per second and each point contains four fields, the write rate in values per second is calculated as follows: 4 x 5000 x 10 = 200000.
Relevant terms: batch, field, point, and points per second.
Write Ahead Log (WAL)
The temporary cache of recently written points. To reduce the frequency of accessing permanent storage files, TSDB for InfluxDB® does not stop caching the recently written points in WAL until the total data volume reaches the threshold or the data writing time exceeds a certain period. In this case, TSDB for InfluxDB® flushes the data in WAL to a storage space that can store data for a longer period. The written data can be effectively written into the TSM file in batches by using WAL.
Points in WAL can be queried and will not be lost after the system restarts. When TSDB for InfluxDB® starts, it must flush all points in WAL to the storage space before the system accepts new write requests.
Relevant terms: TSM.