Need advice about which tool to choose?Ask the StackShare community!
MariaDB vs TimescaleDB: What are the differences?
Introduction
MariaDB and TimescaleDB are both open-source relational database management systems that are designed for specific purposes. While MariaDB is a general-purpose database that is a fork of MySQL, TimescaleDB is a specialized time-series database built on top of PostgreSQL. Let's explore the key differences between these two databases.
Querying: One significant difference between MariaDB and TimescaleDB is their querying capabilities. MariaDB offers traditional SQL querying capabilities, allowing for complex joins, aggregations, and subqueries. On the other hand, TimescaleDB extends PostgreSQL's SQL capabilities with time-series-specific operations, such as time bucketing, interpolation, and retention policies. This enables efficient querying and analysis of time-series data.
Scalability: When it comes to scalability, TimescaleDB is specifically designed to handle time-series data at scale. It leverages automatic time partitioning and hyper table concepts to efficiently distribute data across different chunks and servers, enabling horizontal scaling with ease. In contrast, while MariaDB can scale horizontally by using sharding techniques, it does not have built-in features tailored for time-series data management.
Compression Techniques: TimescaleDB incorporates advanced compression techniques to optimize storage efficiency for time-series data. It leverages compression algorithms specifically designed for time-series data, reducing the storage requirements significantly. MariaDB, being a general-purpose database, does not have specialized compression techniques tailored for time-series data.
Continuous Aggregations: TimescaleDB introduces continuous aggregations, a powerful feature for efficiently summarizing and analyzing time-series data. By pre-computing and continuously updating aggregations as new data arrives, queries that require aggregates over time intervals can be executed significantly faster. MariaDB does not have built-in support for continuous aggregations.
Data Retention Policies: TimescaleDB offers built-in support for managing data retention policies. It allows for automatic and efficient removal of old data based on predefined policies, such as time intervals or size thresholds. MariaDB lacks native features for automated data retention, requiring manual intervention or custom solutions.
Ecosystem and Community: MariaDB has a large and established ecosystem, with a wide range of tools, connectors, and community support available. It has been widely adopted and has a mature user base. TimescaleDB, being a relatively newer database, has a smaller ecosystem and community compared to MariaDB. However, it has gained popularity in the time-series data domain and is continuously growing its ecosystem.
In summary, while both MariaDB and TimescaleDB are open-source databases, their key differences lie in their querying capabilities, scalability features, compression techniques, support for continuous aggregations and data retention policies, as well as the size and maturity of their respective ecosystems and communities.
Developing a solution that collects Telemetry Data from different devices, nearly 1000 devices minimum and maximum 12000. Each device is sending 2 packets in 1 second. This is time-series data, and this data definition and different reports are saved on PostgreSQL. Like Building information, maintenance records, etc. I want to know about the best solution. This data is required for Math and ML to run different algorithms. Also, data is raw without definitions and information stored in PostgreSQL. Initially, I went with TimescaleDB due to PostgreSQL support, but to increase in sites, I started facing many issues with timescale DB in terms of flexibility of storing data.
My major requirement is also the replication of the database for reporting and different purposes. You may also suggest other options other than Druid and Cassandra. But an open source solution is appreciated.
Hi Umair, Did you try MongoDB. We are using MongoDB on a production environment and collecting data from devices like your scenario. We have a MongoDB cluster with three replicas. Data from devices are being written to the master node and real-time dashboard UI is using the secondary nodes for read operations. With this setup write operations are not affected by read operations too.
Hi all. I am an informatics student, and I need to realise a simple website for my friend. I am planning to realise the website using Node.js and Mongoose, since I have already done a project using these technologies. I also know SQL, and I have used PostgreSQL and MySQL previously.
The website will show a possible travel destination and local transportation. The database is used to store information about traveling, so only admin will manage the content (especially photos). While clients will see the content uploaded by the admin. I am planning to use Mongoose because it is very simple and efficient for this project. Please give me your opinion about this choice.
Your requirements seem nothing special. on the other hand, MongoDB is commonly used with Node. you could use Mongo without defining a Schema, does it give you any benefits? Also, note that development speed matters. In most cases RDBMS are the best choice, Learn and use Postgres for life!
The use case you are describing would benefit from a self-hosted headless CMS like contentful. You can also go for Strapi with a database of your choice but here you would have to host Strapi and the underlying database (if not using SQLite) yourself. If you want to use Strapi, you can ease your work by using something like PlanetSCaleDB as the backing database for Strapi.
SQL is not so good at query lat long out of the box. you might need to use additional tools for that like UTM coordinates or Uber's H3.
If you use mongoDB, it support 2d coordinate query out of the box.
Any database will be a great choice for your app, which is less of a technical challenge and more about great content. Go for it, the geographical search features maybe be actually handy for you.
MongoDB and Mongoose are commonly used with Node.js and the use case doesn't seem to be requiring any special considerations as of now. However using MongoDB now will allow you to easily expand and modify your use case in future.
If not MongoDB, then my second choice will be PostgreSQL. It's a generic purpose database with jsonb support (if you need it) and lots of resources online. Nobody was fired for choosing PostgreSQL.
Any database engine should work well but I vote for Postgres because of PostGIS extension that may be handy for travel related site. There's nothing special about your requirements.
Hi, Maxim! Most likely, the site is almost ready. But we would like to share our development with you. https://falcon.web-automation.ru/ This is a constructor for web application. With it, you can create almost any site with different roles which have different levels of access to information and different functionality. The platform is managed via sql. knowing sql, you will be able to change the business logic as necessary and during further project maintenance. We will be glad to hear your feedback about the platform.
We are building an IOT service with heavy write throughput and fewer reads (we need downsampling records). We prefer to have good reliability when comes to data and prefer to have data retention based on policies.
So, we are looking for what is the best underlying DB for ingesting a lot of data and do queries easily
We had a similar challenge. We started with DynamoDB, Timescale, and even InfluxDB and Mongo - to eventually settle with PostgreSQL. Assuming the inbound data pipeline in queued (for example, Kinesis/Kafka -> S3 -> and some Lambda functions), PostgreSQL gave us a We had a similar challenge. We started with DynamoDB, Timescale and even InfluxDB and Mongo - to eventually settle with PostgreSQL. Assuming the inbound data pipeline in queued (for example, Kinesis/Kafka -> S3 -> and some Lambda functions), PostgreSQL gave us better performance by far.
Druid is amazing for this use case and is a cloud-native solution that can be deployed on any cloud infrastructure or on Kubernetes. - Easy to scale horizontally - Column Oriented Database - SQL to query data - Streaming and Batch Ingestion - Native search indexes It has feature to work as TimeSeriesDB, Datawarehouse, and has Time-optimized partitioning.
if you want to find a serverless solution with capability of a lot of storage and SQL kind of capability then google bigquery is the best solution for that.
We actually use both Mongo and SQL databases in production. Mongo excels in both speed and developer friendliness when it comes to geospatial data and queries on the geospatial data, but we also like ACID compliance hence most of our other data (except on-site logs) are stored in a SQL Database (MariaDB for now)
I chose TimescaleDB because to be the backend system of our production monitoring system. We needed to be able to keep track of multiple high cardinality dimensions.
The drawbacks of this decision are our monitoring system is a bit more ad hoc than it used to (New Relic Insights)
We are combining this with Grafana for display and Telegraf for data collection
Pros of MariaDB
- Drop-in mysql replacement149
- Great performance100
- Open source74
- Free55
- Easy setup44
- Easy and fast15
- Lead developer is "monty" widenius the founder of mysql14
- Also an aws rds service6
- Consistent and robust4
- Learning curve easy4
- Native JSON Support / Dynamic Columns2
- Real Multi Threaded queries on a table/db1
Pros of TimescaleDB
- Open source9
- Easy Query Language8
- Time-series data analysis7
- Established postgresql API and support5
- Reliable4
- Paid support for automatic Retention Policy2
- Chunk-based compression2
- Postgres integration2
- High-performance2
- Fast and scalable2
- Case studies1
Sign up to add or upvote prosMake informed product decisions
Cons of MariaDB
Cons of TimescaleDB
- Licensing issues when running on managed databases5