MariaDB vs TimescaleDB

Need advice about which tool to choose?Ask the StackShare community!

MariaDB

16K
12.4K
+ 1
468
TimescaleDB

212
368
+ 1
44
Add tool

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

Advice on MariaDB and TimescaleDB
Umair Iftikhar
Technical Architect at ERP Studio · | 3 upvotes · 432.7K views
Needs advice
on
CassandraCassandraDruidDruid
and
TimescaleDBTimescaleDB

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.

See more
Replies (1)
Recommends
on
MongoDBMongoDB

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.

See more
Maxim Ryakhovskiy
Needs advice
on
MariaDBMariaDBMongooseMongoose
and
PostgreSQLPostgreSQL

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.

See more
Replies (7)

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.

See more
Reza Malek
at Meam Software Engineering Group · | 4 upvotes · 214K views
Recommends
on
MongooseMongoosePostgreSQLPostgreSQL

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!

See more
Tarun Batra
Senior Software Developer at Okta · | 2 upvotes · 206.3K views
Recommends
on
MongooseMongoose

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.

See more
Nutchanon Ninyawee

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.

See more
Recommends
on
MongooseMongoose

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.

See more
Ruslan Rayanov
Recommends

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.

See more
Václav Hodek
CEO, lead developer at Localazy · | 1 upvotes · 206.6K views
Recommends
on
PostgreSQLPostgreSQL

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.

See more
Needs advice
on
InfluxDBInfluxDBMongoDBMongoDB
and
TimescaleDBTimescaleDB

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

See more
Replies (3)
Yaron Lavi
Recommends
on
PostgreSQLPostgreSQL

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.

See more
Recommends
on
DruidDruid

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.

See more
Ankit Malik
Software Developer at CloudCover · | 3 upvotes · 319.9K views
Recommends
on
Google BigQueryGoogle BigQuery

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.

See more
Decisions about MariaDB and TimescaleDB
Omran Jamal
CTO & Co-founder at Bonton Connect · | 4 upvotes · 519.1K views

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)

See more
Benoit Larroque
Principal Engineer at Sqreen · | 2 upvotes · 132.9K views

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

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of MariaDB
Pros of TimescaleDB
  • 149
    Drop-in mysql replacement
  • 100
    Great performance
  • 74
    Open source
  • 55
    Free
  • 44
    Easy setup
  • 15
    Easy and fast
  • 14
    Lead developer is "monty" widenius the founder of mysql
  • 6
    Also an aws rds service
  • 4
    Consistent and robust
  • 4
    Learning curve easy
  • 2
    Native JSON Support / Dynamic Columns
  • 1
    Real Multi Threaded queries on a table/db
  • 9
    Open source
  • 8
    Easy Query Language
  • 7
    Time-series data analysis
  • 5
    Established postgresql API and support
  • 4
    Reliable
  • 2
    Paid support for automatic Retention Policy
  • 2
    Chunk-based compression
  • 2
    Postgres integration
  • 2
    High-performance
  • 2
    Fast and scalable
  • 1
    Case studies

Sign up to add or upvote prosMake informed product decisions

Cons of MariaDB
Cons of TimescaleDB
    Be the first to leave a con
    • 5
      Licensing issues when running on managed databases

    Sign up to add or upvote consMake informed product decisions

    What is MariaDB?

    Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry. MariaDB is designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.

    What is TimescaleDB?

    TimescaleDB: An open-source database built for analyzing time-series data with the power and convenience of SQL — on premise, at the edge, or in the cloud.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use MariaDB?
    What companies use TimescaleDB?
    See which teams inside your own company are using MariaDB or TimescaleDB.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with MariaDB?
    What tools integrate with TimescaleDB?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    What are some alternatives to MariaDB and TimescaleDB?
    PostgreSQL
    PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.
    MySQL
    The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
    Percona
    It delivers enterprise-class software, support, consulting and managed services for both MySQL and MongoDB across traditional and cloud-based platforms.
    Oracle
    Oracle Database is an RDBMS. An RDBMS that implements object-oriented features such as user-defined types, inheritance, and polymorphism is called an object-relational database management system (ORDBMS). Oracle Database has extended the relational model to an object-relational model, making it possible to store complex business models in a relational database.
    MongoDB
    MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
    See all alternatives