I’m right now importing historic data (since 2008) created under Homeseer home automation software into InfluxDB. Basically I want to import my electricity, energy and water meter data and under Homeseer I have created a csv file annually (i.e. one csv file per year) and I store the data once an hour.
I have finally figured out how to import these csv files into InfluxDB using annotated csv format. The InfluxDB GUI seems to be working quite well and I can plot the data in InfluxDB Data explorer. When trying to make a backup of the InfluxDB data I noticed that the data seems to be really “fragmented” so I started to wonder whether InfluxDB is the way to go or whether I should use e.g. MariaDB. I haven’t had a look at MariaDB documentation. Finally I want to plot the data with Grafana.
I know people seem to be using InfluxDB but is it better than MariaDB so I would like to hear opinions (pros and cons). Thanks.
They are two different types of databases with two separate overall goals. MariaDB is a generic relational database. It’s general purpose and it’s OK to good out of the box for most use cases but not great or exceptional without a ton of tuning and configuration.
InfluxDB is a time series database is much more limited but because it only needs to implement one use case (i.e. saving time/value pairs) it’s able to be way better at that one use case than a generic relational database will be. It can handle way more transactions and way more throughput out of the box than a generic relational database can out of the box.
Because all the data generated and stored in persistence by openHAB is time series data, it makes sense to use a time series database. Grafana supports InfluxDB quite well also. The reason why the data seems “fragmented” is because that’s one of the many things InfluxDB does to improve its performance and throughput.
But ultimately, in a home automation context, the performance differences between the two do not matter. The way the data is stored (fragmented or not) doesn’t matter. Use what ever you are most familiar with and/or works best with any external tools you may way to interface with.
Many thanks Rich for the explanations. I agree that it makes sense to use a time series database. I was just wondering how fragmented my influxdb bucket is. I think I’ll have a look at the documentation for MariaDB and then make decision which one to use. At first I was really wondering how to import my historic data but I have managed to solve this issue now. This was really big step for me.