当前位置:网站首页>Incluxdb time series database
Incluxdb time series database
2022-06-25 08:27:00 【victorwjw】
InfluxDB It's a by InfluxData Development of open source sequential data . It consists of Go It's written in , Focus on high-performance query and storage of sequential data .InfluxDB It is widely used in monitoring data of storage system ,IoT Real time data and other scenarios of the industry .
InfluxDB There are three characteristics :
- Time Series ( The time series ): You can use time - dependent correlation functions ( Like the biggest , Minimum , Make a peace, etc )
- Metrics( Measure ): You can calculate a lot of data in real time
- Eevents( event ): It supports arbitrary event data
InfluxDB Detailed explanation _ Let nature take its course ~ The blog of -CSDN Blog _influxdb
database: database ;
measurement: Tables in the database ;
points: A row of data in the table .
influxDB Some unique concepts in :Point By time stamp (time)、 data (field) And labels (tags) form .series: Some data combination , The same database Next ,retention policy、measurement、tag sets
Identical data belong to the same series, The same series The data will be physically stored together ;
stay influxdb in , Field must exist . Because the field has no index . If you use fields as query criteria , Will scan all field values that match the query criteria , The performance is not as good as tag. Analogy ,fields amount to SQL No indexed columns for .
tags It's optional , But it is strongly recommended that you use it , because tag It's indexed ,tags amount to SQL Indexed columns in .tag value Can only be string type .
Commonly used InfluxQL
-- View all databases
show databases;
-- Using a specific database
use database_name;
-- View all measurement
show measurements;
-- Inquire about 10 Data
select * from measurement_name limit 10;
-- The time field in the data displays a nanosecond timestamp by default , Change to readable format
precision rfc3339; -- We'll check later , Time is rfc3339 A standard format
-- Or when connecting to a database , Directly with this parameter
influx -precision rfc3339
-- View one measurement All of the tag key
show tag keys
-- View one measurement All of the field key
show field keys
-- View one measurement All of the save strategies in ( There can be multiple , One sign is default)
show retention policies;
create database db1 -- Create database db1
drop database db1 -- Delete database db1
drop measurement mt1 -- Delete table mt1
delete from measurement [WHERE <tag_key> <operator>]
drop shard <shard_id_num> Delete fragment
function · InfluxDB Chinese document
influxdbV1 and influxdbV2
1. Query method changes
The original use InfluxQL Mode query , Now use the built-in Flux Mode query
2. The underlying data structure changes
The original bucket+ Time retention schedule = current bucket
3. task Replace continuous queries
1.x Version and 2.x The biggest difference between versions is continuous query (continuous query) Has been tasked with (task) replaced .influxdb The continuous query function in is a data processing function provided externally , For example, in order to prevent our storage logs from being too large, we have established a storage policy , Data will be lost after the set timeout . In this case , We can use the continuous query function , Summarize the user's data 、 Sampling and other operations , Insert it into another table , Although some precision is lost , But the space occupied by data is greatly reduced .
Installation and access
2.x edition , Need to remember bucket host org token
Flux query basics | Flux 0.x Documentation
from(bucket: "example-bucket") // ── Source
|> range(start: -1d) // ── Filter on time
|> filter(fn: (r) => r._field == "foo") // ── Filter on column values
|> group(columns: ["sensorID"]) // ── Shape
|> mean() // ── Process
边栏推荐
- InfluxDB时序数据库
- [thesis study] vqmivc
- Common action types
- Luogu p6822 [pa2012]tax (shortest circuit + edge change point)
- Use Adobe Acrobat pro to resize PDF pages
- leetcode. 13 --- Roman numeral to integer
- Static web server
- 想要软件测试效果好,搭建好测试环境是前提
- The era of enterprise full cloud -- the future of cloud database
- VOCALOID notes
猜你喜欢
How to calculate the positive and negative ideal solution and the positive and negative ideal distance in TOPSIS method?
Unity addressable batch management
First experience Amazon Neptune, a fully managed map database
The era of enterprise full cloud -- the future of cloud database
TCP stuff
Establish open data set standards and enable AI engineering implementation
TS environment setup
Log in to MySQL 5.7 under ubuntu18 and set the root password
What are the indicators of VIKOR compromise?
417 sequence traversal of binary tree 1 (102. sequence traversal of binary tree, 107. level traversal of binary tree II, 199. right view of binary tree, 637. layer average of binary tree)
随机推荐
Rank sum ratio (RSR) index calculation
June training (day 25) - tree array
Establish open data set standards and enable AI engineering implementation
[red flag Cup] Supplementary questions
Go语言学习教程(十三)
Go language learning tutorial (13)
Luogu p5994 [pa2014]kuglarz (XOR thinking +mst)
Quickly build a real-time face mask detection system in five minutes (opencv+paddlehub with source code)
测一测现在的温度
第五天 脚本与UI系统
初识生成对抗网络(11)——利用Pytorch搭建WGAN生成手写数字
TCP and UDP
Network model -- OSI model and tcp/ip model
Data-centric vs. Model-centric. The Answer is Clear!
图像超分综述:超长文一网打尽图像超分的前世今生 (附核心代码)
How is the ISM model analyzed?
What is SKU and SPU? What is the difference between SKU and SPU
4个不可不知的采用“安全左移”的理由
The first game of 2021 ICPC online game
Luogu p1073 [noip2009 improvement group] optimal trade (layered diagram + shortest path)