SlideShare a Scribd company logo
1 of 39
Download to read offline
InfluxDB
The time series database
Modern Factory #workshops

Marcin Szepczyński, July 2016
What is time series
data?
What is time series data?
• A time series data is a sequence of data points
made from the same source over the time interval.
• If you have a time series data and plot it, one of
your axes will be always a time.
Examples of time
series data
What is not a time
series data?
Regular vs irregular 

time series
Time series data is good for
• Internet of Things (e.g. sensors data)
• Alerting
• Monitoring
• Real Time Analytics
InfluxDB is I in TICK stack
• Telegraf - time data collector
• InfluxDB - time series database
• Chronograf - time series data visualization
• Kapacitor - time series data processing and
alerting
InfluxDB features
• SQL-like query language
• Schemaless
• Case sensitive
• Data types: string, float64, int64, boolean
Measurement
• Measurement (or Point) is a single record (row) in
InfluxDB data store
• Each measurement has time (as primary key), tags
(indexed columns) and fields (not indexed
columns)
Inserting
INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5
measurement name 

(„table”)
Inserting
INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5
measurement name 

(„table”)
Comma is a separator between measurement and tags

Comma is a separator between each tag and each field

Inserting
INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5
measurement name 

(„table”)




Space is a separator between tags and fields
Inserting
INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5
measurement name 

(„table”)
tags
Tags
tag1 tag2
value1 value2
Inserting
INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5
measurement name 

(„table”)
fields
Fields
temp value
30.5 1.5
Inserting
INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5
measurement name 

(„table”)
Comma is a separator between measurement and tags

Comma is a separator between each tag and each field

Space is a separator between tags and fields
tags
fields
Querying
• Show databases:

> SHOW DATABASES
• Select database:

> USE workshop
• Show measurements („tables”)

> SHOW MEASUREMENTS
• Simple select all

> SELECT * FROM measurement_name
Querying (2)
• Select with limit:

> SELECT * FROM measure LIMIT 10
• Select with offset:

> SELECT * FROM measure OFFSET 10
• Select where clause:

> SELECT * FROM measure WHERE tag1 = ’value1’
• Select with order clause:

> SELECT * FROM measure ORDER BY cpu DESC
Querying (3)
• Operators:

= equal to

<>, != not equal to

> greater than

< less than

=~ matches against (REGEX)

!~ doesn’t matches against (REGEX)
Aggregations - COUNT()
Returns the number of non-null values.





> SELECT count(<field>) FROM measure



> SELECT count(cpu) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Aggregations - MEAN()
Returns the mean (average) value of a single field
(calculates only for non-null values).





> SELECT mean(<field>) FROM measure



> SELECT mean(cpu) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Aggregations - MEDIAN()
Returns the middle value from the sorted values in
single field (Its similar to PERCENTILE(field, 50).





> SELECT median(<field>) FROM measure



> SELECT median(cpu) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Aggregations - SPREAD()
Returns the difference between minimum and
maximum value of the field.





> SELECT spread(<field>) FROM measure



> SELECT spread(cpu) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Aggregations - SUM()
Returns the sum of all values in a single field.





> SELECT sum(<field>) FROM measure



> SELECT sum(cpu) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Selectors - BOTTOM(N)
Returns the smaller N values in a single field.





> SELECT bottom(<field>, <N>) FROM measure



> SELECT bottom(cpu, 5) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Selectors - FIRST()
Returns the oldest values of a single field.





> SELECT first(<field>) FROM measure



> SELECT first(cpu) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Selectors - LAST()
Returns the newest values of a single field.





> SELECT last(<field>) FROM measure



> SELECT last(cpu) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Selectors - MAX()
Returns the highest value in a single field.





> SELECT max(<field>) FROM measure



> SELECT max(cpu) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Selectors - MIN()
Returns the lowest value in a single field.





> SELECT min(<field>) FROM measure



> SELECT min(cpu) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Selectors - PERCENTILE(N)
Returns the N-percentile value for sorted values of a
single field.





> SELECT percentile(<field>, <N>) FROM measure



> SELECT percentile(cpu, 95) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
Selectors - TOP(N)
Returns the largest N values in a single field.





> SELECT top(<field>, <N>) FROM measure



> SELECT top(cpu, 5) FROM cpu_temp 

WHERE time > '2016-07-04' 

AND time < '2016-07-05' 

GROUP BY time(1h)
GROUP BY clause
InfluxDB supports GROUP BY clause with tag values,
time intervals, tag values and time intervals and
GROUP BY with fill().
Downsampling
InfluxDB can handle hundreds of thousands of data
points per second. Working with that much data over
a long period of time can create storage concerns. A
natural solution is to downsample the data; keep the
high precision raw data for only a limited time, and
store the lower precision, summarized data for much
longer or forever.
Data retention
A retention policy is the part of InfluxDB’s data
structure that describes for how long InfluxDB keeps
data and how many copies of those data are stored
in the cluster. A database can have several RPs and
RPs are unique per database.
More
https://influxdata.com/videos/
https://docs.influxdata.com/influxdb

More Related Content

What's hot

MongoDB at Scale
MongoDB at ScaleMongoDB at Scale
MongoDB at ScaleMongoDB
 
Need for Time series Database
Need for Time series DatabaseNeed for Time series Database
Need for Time series DatabasePramit Choudhary
 
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016DataStax
 
Rainbird: Realtime Analytics at Twitter (Strata 2011)
Rainbird: Realtime Analytics at Twitter (Strata 2011)Rainbird: Realtime Analytics at Twitter (Strata 2011)
Rainbird: Realtime Analytics at Twitter (Strata 2011)Kevin Weil
 
ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...
ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...
ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...Altinity Ltd
 
The columnar roadmap: Apache Parquet and Apache Arrow
The columnar roadmap: Apache Parquet and Apache ArrowThe columnar roadmap: Apache Parquet and Apache Arrow
The columnar roadmap: Apache Parquet and Apache ArrowDataWorks Summit
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB Habilelabs
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMike Dirolf
 
Indexing with MongoDB
Indexing with MongoDBIndexing with MongoDB
Indexing with MongoDBMongoDB
 
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...Altinity Ltd
 
C* Summit 2013: The World's Next Top Data Model by Patrick McFadin
C* Summit 2013: The World's Next Top Data Model by Patrick McFadinC* Summit 2013: The World's Next Top Data Model by Patrick McFadin
C* Summit 2013: The World's Next Top Data Model by Patrick McFadinDataStax Academy
 
Introduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizerIntroduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizerMydbops
 
Data Analysis with Python Pandas
Data Analysis with Python PandasData Analysis with Python Pandas
Data Analysis with Python PandasNeeru Mittal
 
pandas: Powerful data analysis tools for Python
pandas: Powerful data analysis tools for Pythonpandas: Powerful data analysis tools for Python
pandas: Powerful data analysis tools for PythonWes McKinney
 
How Prometheus Store the Data
How Prometheus Store the DataHow Prometheus Store the Data
How Prometheus Store the DataHao Chen
 
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...InfluxData
 

What's hot (20)

MongoDB at Scale
MongoDB at ScaleMongoDB at Scale
MongoDB at Scale
 
InfluxDB & Grafana
InfluxDB & GrafanaInfluxDB & Grafana
InfluxDB & Grafana
 
Need for Time series Database
Need for Time series DatabaseNeed for Time series Database
Need for Time series Database
 
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
Myths of Big Partitions (Robert Stupp, DataStax) | Cassandra Summit 2016
 
Rainbird: Realtime Analytics at Twitter (Strata 2011)
Rainbird: Realtime Analytics at Twitter (Strata 2011)Rainbird: Realtime Analytics at Twitter (Strata 2011)
Rainbird: Realtime Analytics at Twitter (Strata 2011)
 
ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...
ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...
ClickHouse Data Warehouse 101: The First Billion Rows, by Alexander Zaitsev a...
 
The columnar roadmap: Apache Parquet and Apache Arrow
The columnar roadmap: Apache Parquet and Apache ArrowThe columnar roadmap: Apache Parquet and Apache Arrow
The columnar roadmap: Apache Parquet and Apache Arrow
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Indexing with MongoDB
Indexing with MongoDBIndexing with MongoDB
Indexing with MongoDB
 
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
 
C* Summit 2013: The World's Next Top Data Model by Patrick McFadin
C* Summit 2013: The World's Next Top Data Model by Patrick McFadinC* Summit 2013: The World's Next Top Data Model by Patrick McFadin
C* Summit 2013: The World's Next Top Data Model by Patrick McFadin
 
Introduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizerIntroduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizer
 
Data Analysis with Python Pandas
Data Analysis with Python PandasData Analysis with Python Pandas
Data Analysis with Python Pandas
 
pandas: Powerful data analysis tools for Python
pandas: Powerful data analysis tools for Pythonpandas: Powerful data analysis tools for Python
pandas: Powerful data analysis tools for Python
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
Mongo DB Presentation
Mongo DB PresentationMongo DB Presentation
Mongo DB Presentation
 
Pandas
PandasPandas
Pandas
 
How Prometheus Store the Data
How Prometheus Store the DataHow Prometheus Store the Data
How Prometheus Store the Data
 
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
 

Viewers also liked

Introduction to InfluxDB, an Open Source Distributed Time Series Database by ...
Introduction to InfluxDB, an Open Source Distributed Time Series Database by ...Introduction to InfluxDB, an Open Source Distributed Time Series Database by ...
Introduction to InfluxDB, an Open Source Distributed Time Series Database by ...Hakka Labs
 
Beautiful Monitoring With Grafana and InfluxDB
Beautiful Monitoring With Grafana and InfluxDBBeautiful Monitoring With Grafana and InfluxDB
Beautiful Monitoring With Grafana and InfluxDBleesjensen
 
Custom DevOps Monitoring System in MelOn (with InfluxDB + Telegraf + Grafana)
Custom DevOps Monitoring System in MelOn (with InfluxDB + Telegraf + Grafana)Custom DevOps Monitoring System in MelOn (with InfluxDB + Telegraf + Grafana)
Custom DevOps Monitoring System in MelOn (with InfluxDB + Telegraf + Grafana)Seungmin Yu
 
Alerting in Grafana, Grafanacon 2015
Alerting in Grafana, Grafanacon 2015Alerting in Grafana, Grafanacon 2015
Alerting in Grafana, Grafanacon 2015Dieter Plaetinck
 
Grafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and ChallengesGrafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and ChallengesPhilip Wernersbach
 
Stop using Nagios (so it can die peacefully)
Stop using Nagios (so it can die peacefully)Stop using Nagios (so it can die peacefully)
Stop using Nagios (so it can die peacefully)Andy Sykes
 
Convertigo Mobility Platform | Mobile Application Development for Enterprises...
Convertigo Mobility Platform | Mobile Application Development for Enterprises...Convertigo Mobility Platform | Mobile Application Development for Enterprises...
Convertigo Mobility Platform | Mobile Application Development for Enterprises...Convertigo | MADP & MBaaS
 
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! Redis Labs
 
Next generation alerting and fault detection, SRECon Europe 2016
Next generation alerting and fault detection, SRECon Europe 2016Next generation alerting and fault detection, SRECon Europe 2016
Next generation alerting and fault detection, SRECon Europe 2016Dieter Plaetinck
 
job design and ergonomics
job design and ergonomicsjob design and ergonomics
job design and ergonomicspiyush11111993
 
Cf summit-2016-monitoring-cf-sensu-graphite
Cf summit-2016-monitoring-cf-sensu-graphiteCf summit-2016-monitoring-cf-sensu-graphite
Cf summit-2016-monitoring-cf-sensu-graphiteJeff Barrows
 
Sense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with Sensu
Sense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with SensuSense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with Sensu
Sense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with SensuBethany Erskine
 
Sensu @ Yelp!: A Guided Tour
Sensu @ Yelp!: A Guided TourSensu @ Yelp!: A Guided Tour
Sensu @ Yelp!: A Guided TourKyle Anderson
 
MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)Seungmin Yu
 
Open Source Monitoring in 2014, from #monitoringssucks to #monitoringlove and...
Open Source Monitoring in 2014, from #monitoringssucks to #monitoringlove and...Open Source Monitoring in 2014, from #monitoringssucks to #monitoringlove and...
Open Source Monitoring in 2014, from #monitoringssucks to #monitoringlove and...Kris Buytaert
 
Time Series Database and Tick Stack
Time Series Database and Tick StackTime Series Database and Tick Stack
Time Series Database and Tick StackGianluca Arbezzano
 
A Fast and Efficient Time Series Storage Based on Apache Solr
A Fast and Efficient Time Series Storage Based on Apache SolrA Fast and Efficient Time Series Storage Based on Apache Solr
A Fast and Efficient Time Series Storage Based on Apache SolrQAware GmbH
 

Viewers also liked (20)

Introduction to InfluxDB, an Open Source Distributed Time Series Database by ...
Introduction to InfluxDB, an Open Source Distributed Time Series Database by ...Introduction to InfluxDB, an Open Source Distributed Time Series Database by ...
Introduction to InfluxDB, an Open Source Distributed Time Series Database by ...
 
Beautiful Monitoring With Grafana and InfluxDB
Beautiful Monitoring With Grafana and InfluxDBBeautiful Monitoring With Grafana and InfluxDB
Beautiful Monitoring With Grafana and InfluxDB
 
Custom DevOps Monitoring System in MelOn (with InfluxDB + Telegraf + Grafana)
Custom DevOps Monitoring System in MelOn (with InfluxDB + Telegraf + Grafana)Custom DevOps Monitoring System in MelOn (with InfluxDB + Telegraf + Grafana)
Custom DevOps Monitoring System in MelOn (with InfluxDB + Telegraf + Grafana)
 
Grafana zabbix
Grafana zabbixGrafana zabbix
Grafana zabbix
 
Alerting in Grafana, Grafanacon 2015
Alerting in Grafana, Grafanacon 2015Alerting in Grafana, Grafanacon 2015
Alerting in Grafana, Grafanacon 2015
 
Grafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and ChallengesGrafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and Challenges
 
Stop using Nagios (so it can die peacefully)
Stop using Nagios (so it can die peacefully)Stop using Nagios (so it can die peacefully)
Stop using Nagios (so it can die peacefully)
 
Intro to UML
Intro to UMLIntro to UML
Intro to UML
 
Convertigo Mobility Platform | Mobile Application Development for Enterprises...
Convertigo Mobility Platform | Mobile Application Development for Enterprises...Convertigo Mobility Platform | Mobile Application Development for Enterprises...
Convertigo Mobility Platform | Mobile Application Development for Enterprises...
 
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More!
 
Next generation alerting and fault detection, SRECon Europe 2016
Next generation alerting and fault detection, SRECon Europe 2016Next generation alerting and fault detection, SRECon Europe 2016
Next generation alerting and fault detection, SRECon Europe 2016
 
job design and ergonomics
job design and ergonomicsjob design and ergonomics
job design and ergonomics
 
Cf summit-2016-monitoring-cf-sensu-graphite
Cf summit-2016-monitoring-cf-sensu-graphiteCf summit-2016-monitoring-cf-sensu-graphite
Cf summit-2016-monitoring-cf-sensu-graphite
 
Sense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with Sensu
Sense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with SensuSense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with Sensu
Sense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with Sensu
 
Sensu @ Yelp!: A Guided Tour
Sensu @ Yelp!: A Guided TourSensu @ Yelp!: A Guided Tour
Sensu @ Yelp!: A Guided Tour
 
MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQL InnoDB Cluster 미리보기 (remote cluster test)
 
Infiniflux introduction
Infiniflux introductionInfiniflux introduction
Infiniflux introduction
 
Open Source Monitoring in 2014, from #monitoringssucks to #monitoringlove and...
Open Source Monitoring in 2014, from #monitoringssucks to #monitoringlove and...Open Source Monitoring in 2014, from #monitoringssucks to #monitoringlove and...
Open Source Monitoring in 2014, from #monitoringssucks to #monitoringlove and...
 
Time Series Database and Tick Stack
Time Series Database and Tick StackTime Series Database and Tick Stack
Time Series Database and Tick Stack
 
A Fast and Efficient Time Series Storage Based on Apache Solr
A Fast and Efficient Time Series Storage Based on Apache SolrA Fast and Efficient Time Series Storage Based on Apache Solr
A Fast and Efficient Time Series Storage Based on Apache Solr
 

Similar to Influxdb and time series data

Unit 5 Time series Data Analysis.pdf
Unit 5 Time series Data Analysis.pdfUnit 5 Time series Data Analysis.pdf
Unit 5 Time series Data Analysis.pdfSheba41
 
Row Pattern Matching in Oracle Database 12c
Row Pattern Matching in Oracle Database 12cRow Pattern Matching in Oracle Database 12c
Row Pattern Matching in Oracle Database 12cStew Ashton
 
Intro to DAX Patterns
Intro to DAX PatternsIntro to DAX Patterns
Intro to DAX PatternsEric Bragas
 
Sql FUNCTIONS
Sql FUNCTIONSSql FUNCTIONS
Sql FUNCTIONSAbrar ali
 
Row patternmatching12ctech14
Row patternmatching12ctech14Row patternmatching12ctech14
Row patternmatching12ctech14stewashton
 
Chapter 16-spreadsheet1 questions and answer
Chapter 16-spreadsheet1  questions and answerChapter 16-spreadsheet1  questions and answer
Chapter 16-spreadsheet1 questions and answerRaajTech
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencySaranya Natarajan
 
Data Structure & Algorithms - Introduction
Data Structure & Algorithms - IntroductionData Structure & Algorithms - Introduction
Data Structure & Algorithms - Introductionbabuk110
 
Dipa Dubhashi's presentation
Dipa Dubhashi's presentationDipa Dubhashi's presentation
Dipa Dubhashi's presentationpunesparkmeetup
 
Router Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditionsRouter Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditionsMorteza Mahdilar
 
Analysis of algorithn class 2
Analysis of algorithn class 2Analysis of algorithn class 2
Analysis of algorithn class 2Kumar
 
arrays-120712074248-phpapp01
arrays-120712074248-phpapp01arrays-120712074248-phpapp01
arrays-120712074248-phpapp01Abdul Samee
 
Where the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsWhere the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsMatt Warren
 
Java/Scala Lab 2016. Сергей Моренец: Способы повышения эффективности в Java 8.
Java/Scala Lab 2016. Сергей Моренец: Способы повышения эффективности в Java 8.Java/Scala Lab 2016. Сергей Моренец: Способы повышения эффективности в Java 8.
Java/Scala Lab 2016. Сергей Моренец: Способы повышения эффективности в Java 8.GeeksLab Odessa
 
Predicting Optimal Parallelism for Data Analytics
Predicting Optimal Parallelism for Data AnalyticsPredicting Optimal Parallelism for Data Analytics
Predicting Optimal Parallelism for Data AnalyticsDatabricks
 
Cost Based Optimizer - Part 1 of 2
Cost Based Optimizer - Part 1 of 2Cost Based Optimizer - Part 1 of 2
Cost Based Optimizer - Part 1 of 2Mahesh Vallampati
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence PortfolioChris Seebacher
 

Similar to Influxdb and time series data (20)

Unit 5 Time series Data Analysis.pdf
Unit 5 Time series Data Analysis.pdfUnit 5 Time series Data Analysis.pdf
Unit 5 Time series Data Analysis.pdf
 
Row Pattern Matching in Oracle Database 12c
Row Pattern Matching in Oracle Database 12cRow Pattern Matching in Oracle Database 12c
Row Pattern Matching in Oracle Database 12c
 
Intro to DAX Patterns
Intro to DAX PatternsIntro to DAX Patterns
Intro to DAX Patterns
 
Sql FUNCTIONS
Sql FUNCTIONSSql FUNCTIONS
Sql FUNCTIONS
 
Row patternmatching12ctech14
Row patternmatching12ctech14Row patternmatching12ctech14
Row patternmatching12ctech14
 
Phoenix h basemeetup
Phoenix h basemeetupPhoenix h basemeetup
Phoenix h basemeetup
 
Chapter 16-spreadsheet1 questions and answer
Chapter 16-spreadsheet1  questions and answerChapter 16-spreadsheet1  questions and answer
Chapter 16-spreadsheet1 questions and answer
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm Efficiency
 
Data Structure & Algorithms - Introduction
Data Structure & Algorithms - IntroductionData Structure & Algorithms - Introduction
Data Structure & Algorithms - Introduction
 
Dipa Dubhashi's presentation
Dipa Dubhashi's presentationDipa Dubhashi's presentation
Dipa Dubhashi's presentation
 
Searching Algorithms
Searching AlgorithmsSearching Algorithms
Searching Algorithms
 
Router Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditionsRouter Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditions
 
Analysis of algorithn class 2
Analysis of algorithn class 2Analysis of algorithn class 2
Analysis of algorithn class 2
 
arrays-120712074248-phpapp01
arrays-120712074248-phpapp01arrays-120712074248-phpapp01
arrays-120712074248-phpapp01
 
Annotations.pdf
Annotations.pdfAnnotations.pdf
Annotations.pdf
 
Where the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-OptimisationsWhere the wild things are - Benchmarking and Micro-Optimisations
Where the wild things are - Benchmarking and Micro-Optimisations
 
Java/Scala Lab 2016. Сергей Моренец: Способы повышения эффективности в Java 8.
Java/Scala Lab 2016. Сергей Моренец: Способы повышения эффективности в Java 8.Java/Scala Lab 2016. Сергей Моренец: Способы повышения эффективности в Java 8.
Java/Scala Lab 2016. Сергей Моренец: Способы повышения эффективности в Java 8.
 
Predicting Optimal Parallelism for Data Analytics
Predicting Optimal Parallelism for Data AnalyticsPredicting Optimal Parallelism for Data Analytics
Predicting Optimal Parallelism for Data Analytics
 
Cost Based Optimizer - Part 1 of 2
Cost Based Optimizer - Part 1 of 2Cost Based Optimizer - Part 1 of 2
Cost Based Optimizer - Part 1 of 2
 
Business Intelligence Portfolio
Business Intelligence PortfolioBusiness Intelligence Portfolio
Business Intelligence Portfolio
 

Recently uploaded

Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringJuanCarlosMorales19600
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 

Recently uploaded (20)

Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineering
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 

Influxdb and time series data

  • 1. InfluxDB The time series database Modern Factory #workshops
 Marcin Szepczyński, July 2016
  • 2. What is time series data?
  • 3. What is time series data? • A time series data is a sequence of data points made from the same source over the time interval. • If you have a time series data and plot it, one of your axes will be always a time.
  • 5.
  • 6.
  • 7. What is not a time series data?
  • 8.
  • 9.
  • 10. Regular vs irregular 
 time series
  • 11. Time series data is good for • Internet of Things (e.g. sensors data) • Alerting • Monitoring • Real Time Analytics
  • 12. InfluxDB is I in TICK stack • Telegraf - time data collector • InfluxDB - time series database • Chronograf - time series data visualization • Kapacitor - time series data processing and alerting
  • 13. InfluxDB features • SQL-like query language • Schemaless • Case sensitive • Data types: string, float64, int64, boolean
  • 14. Measurement • Measurement (or Point) is a single record (row) in InfluxDB data store • Each measurement has time (as primary key), tags (indexed columns) and fields (not indexed columns)
  • 16. Inserting INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5 measurement name 
 („table”) Comma is a separator between measurement and tags
 Comma is a separator between each tag and each field

  • 17. Inserting INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5 measurement name 
 („table”) 
 
 Space is a separator between tags and fields
  • 18. Inserting INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5 measurement name 
 („table”) tags Tags tag1 tag2 value1 value2
  • 19. Inserting INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5 measurement name 
 („table”) fields Fields temp value 30.5 1.5
  • 20. Inserting INSERT table_name,tag1=value1,tag2=value2 temp=30.5,value=1.5 measurement name 
 („table”) Comma is a separator between measurement and tags
 Comma is a separator between each tag and each field
 Space is a separator between tags and fields tags fields
  • 21. Querying • Show databases:
 > SHOW DATABASES • Select database:
 > USE workshop • Show measurements („tables”)
 > SHOW MEASUREMENTS • Simple select all
 > SELECT * FROM measurement_name
  • 22. Querying (2) • Select with limit:
 > SELECT * FROM measure LIMIT 10 • Select with offset:
 > SELECT * FROM measure OFFSET 10 • Select where clause:
 > SELECT * FROM measure WHERE tag1 = ’value1’ • Select with order clause:
 > SELECT * FROM measure ORDER BY cpu DESC
  • 23. Querying (3) • Operators:
 = equal to
 <>, != not equal to
 > greater than
 < less than
 =~ matches against (REGEX)
 !~ doesn’t matches against (REGEX)
  • 24. Aggregations - COUNT() Returns the number of non-null values.
 
 
 > SELECT count(<field>) FROM measure
 
 > SELECT count(cpu) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 25. Aggregations - MEAN() Returns the mean (average) value of a single field (calculates only for non-null values).
 
 
 > SELECT mean(<field>) FROM measure
 
 > SELECT mean(cpu) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 26. Aggregations - MEDIAN() Returns the middle value from the sorted values in single field (Its similar to PERCENTILE(field, 50).
 
 
 > SELECT median(<field>) FROM measure
 
 > SELECT median(cpu) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 27. Aggregations - SPREAD() Returns the difference between minimum and maximum value of the field.
 
 
 > SELECT spread(<field>) FROM measure
 
 > SELECT spread(cpu) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 28. Aggregations - SUM() Returns the sum of all values in a single field.
 
 
 > SELECT sum(<field>) FROM measure
 
 > SELECT sum(cpu) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 29. Selectors - BOTTOM(N) Returns the smaller N values in a single field.
 
 
 > SELECT bottom(<field>, <N>) FROM measure
 
 > SELECT bottom(cpu, 5) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 30. Selectors - FIRST() Returns the oldest values of a single field.
 
 
 > SELECT first(<field>) FROM measure
 
 > SELECT first(cpu) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 31. Selectors - LAST() Returns the newest values of a single field.
 
 
 > SELECT last(<field>) FROM measure
 
 > SELECT last(cpu) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 32. Selectors - MAX() Returns the highest value in a single field.
 
 
 > SELECT max(<field>) FROM measure
 
 > SELECT max(cpu) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 33. Selectors - MIN() Returns the lowest value in a single field.
 
 
 > SELECT min(<field>) FROM measure
 
 > SELECT min(cpu) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 34. Selectors - PERCENTILE(N) Returns the N-percentile value for sorted values of a single field.
 
 
 > SELECT percentile(<field>, <N>) FROM measure
 
 > SELECT percentile(cpu, 95) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 35. Selectors - TOP(N) Returns the largest N values in a single field.
 
 
 > SELECT top(<field>, <N>) FROM measure
 
 > SELECT top(cpu, 5) FROM cpu_temp 
 WHERE time > '2016-07-04' 
 AND time < '2016-07-05' 
 GROUP BY time(1h)
  • 36. GROUP BY clause InfluxDB supports GROUP BY clause with tag values, time intervals, tag values and time intervals and GROUP BY with fill().
  • 37. Downsampling InfluxDB can handle hundreds of thousands of data points per second. Working with that much data over a long period of time can create storage concerns. A natural solution is to downsample the data; keep the high precision raw data for only a limited time, and store the lower precision, summarized data for much longer or forever.
  • 38. Data retention A retention policy is the part of InfluxDB’s data structure that describes for how long InfluxDB keeps data and how many copies of those data are stored in the cluster. A database can have several RPs and RPs are unique per database.