当前位置:网站首页>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边栏推荐
- How to analyze the coupling coordination index?
- DNS protocol and its complete DNS query process
- Wechat applet introduction record
- Luogu p5994 [pa2014]kuglarz (XOR thinking +mst)
- Electronics: Lesson 008 - Experiment 6: very simple switches
- Use Adobe Acrobat pro to resize PDF pages
- June training (day 25) - tree array
- 4 raisons inconnues d'utiliser le "déplacement sûr à gauche"
- Go language learning tutorial (13)
- First experience Amazon Neptune, a fully managed map database
猜你喜欢
How to calculate the characteristic vector, weight value, CI value and other indicators in AHP?

Talk about the future of cloud native database

使用pytorch搭建MobileNetV2并基于迁移学习训练

leetcode. 13 --- Roman numeral to integer

Stack awareness - stack overflow instance (ret2libc)

初体验完全托管型图数据库 Amazon Neptune

TS environment setup

STM32CubeMX 學習(5)輸入捕獲實驗

自制坡道,可是真的很香

Deep learning series 48:deepfaker
随机推荐
[thesis study] vqmivc
使用apt-get命令如何安装软件?
Network model -- OSI model and tcp/ip model
How to calculate the fuzzy comprehensive evaluation index? How to calculate the four fuzzy operators?
软件工程复习题
软件确认测试有什么作用?确认测试报告的价格是多少?
Electronics: Lesson 009 - Experiment 7: study relays
Unit conversion - mm to pixel - pixel to MM
Luogu p5994 [pa2014]kuglarz (XOR thinking +mst)
First experience Amazon Neptune, a fully managed map database
Unity addressable batch management
TS environment setup
Biweekly investment and financial report: capital ambush Web3 infrastructure
Use Adobe Acrobat pro to resize PDF pages
TCP 加速小记
在网上股票开户安全吗?证券账户可以给别人用吗?
六月集训(第25天) —— 树状数组
iframe简单使用 、获取iframe 、获取iframe 元素值 、iframe获取父页面的信息
June training (day 25) - tree array
GIL问题带来的问题,解决方法