MG Software.
HomeAboutServicesPortfolioBlogCalculator
Contact Us
MG Software
MG Software
MG Software.

MG Software builds custom software, websites and AI solutions that help businesses grow.

© 2026 MG Software B.V. All rights reserved.

NavigationServicesPortfolioAbout UsContactBlogCalculator
ServicesCustom developmentSoftware integrationsSoftware redevelopmentApp developmentSEO & discoverability
Knowledge BaseKnowledge BaseComparisonsExamplesAlternativesTemplatesToolsSolutionsAPI integrations
LocationsHaarlemAmsterdamThe HagueEindhovenBredaAmersfoortAll locations
IndustriesLegalEnergyHealthcareE-commerceLogisticsAll industries
MG Software.
HomeAboutServicesPortfolioBlogCalculator
Contact Us
  1. Home
  2. /Alternatives
  3. /Stepping past MySQL for JSONB and CTEs? Five alternatives

Stepping past MySQL for JSONB and CTEs? Five alternatives

MySQL lacks modern features like JSONB, recursive CTEs and native partitioning. PostgreSQL and PlanetScale lead the pack. Compare 5 databases that offer more.

At MG Software, we recommend PostgreSQL as the default MySQL alternative thanks to its richer feature set, active independent community and complete absence of licensing risks. For teams that strictly require MySQL compatibility, MariaDB offers the safest migration path with minimal code changes.

Stepping past MySQL for JSONB and CTEs? Five alternatives

Why do people look for alternatives to MySQL is the most popular open-source relational database in the world, holding over 40% market share among relational databases. It is owned by Oracle and widely used for web applications, CMS platforms like WordPress and Drupal, and e-commerce systems such as Magento and WooCommerce. MySQL uses InnoDB as its default storage engine with ACID transactions, built-in replication and a maximum row size of 65,535 bytes. The Community Edition is free, while MySQL Enterprise Edition starts at approximately $5,000 per year per server and includes Thread Pool, Audit Plugin and Enterprise Backup. MySQL 8.0 introduced window functions, CTEs and JSON improvements, but it still lags behind PostgreSQL in advanced SQL capabilities.?

Developers seek MySQL alternatives for several practical reasons. Oracle's licensing model creates uncertainty with the split between the free Community Edition and the expensive Enterprise Edition, leaving teams unsure about long-term costs. MySQL lacks features that PostgreSQL provides out of the box, including JSONB with indexing, materialized views, table inheritance and advanced partitioning strategies. The growing demand for serverless databases with scale-to-zero and automatic horizontal scaling does not fit MySQL's traditional client-server architecture. Teams also encounter limitations with MySQL's weaker CHECK constraints, the absence of native UPSERT before version 8.0 and a less strict default SQL mode that can allow unexpected data type conversions.

Best alternatives

PostgreSQL

PostgreSQL is the most advanced open-source relational database, supporting over 90 data types, JSONB with GIN indexing, full-text search, recursive CTEs, window functions and an ecosystem of more than 1,000 extensions. It is maintained by an independent community with no commercial owner. PostgreSQL 17 brings improved JSON_TABLE support, incremental backups and better query parallelisation. It is entirely free with no licensing fees or feature differences between editions.

Pros

  • +Richer SQL feature set with recursive CTEs, window functions, materialized views and native partitioning
  • +Extensive data type support including JSONB with GIN indexing, arrays, hstore and user-defined types
  • +Independent community governance with no commercial owner, zero licensing risks and no vendor lock-in
  • +Ecosystem of over 1,000 extensions including PostGIS, pgvector, TimescaleDB and Citus for specialised workloads

Cons

  • -Slightly higher memory consumption than MySQL for simple read-heavy workloads due to MVCC overhead
  • -Configuration tuning for optimal performance requires deeper knowledge of parameters like work_mem and shared_buffers
  • -Replication setup is more complex than MySQL native binlog replication for simple primary-replica configurations
Best for: Projects that need advanced SQL features, complex data models and maximum flexibility in data types without dependence on a commercial database vendor or restrictive licensing terms.

MariaDB

MariaDB is a community-driven fork of MySQL founded in 2009 by Michael Widenius, the original creator of MySQL. It provides full drop-in compatibility with MySQL and adds features including the Aria storage engine, ColumnStore for analytical workloads, temporal tables and an Oracle-compatible PL/SQL mode. MariaDB Community Server is free, while SkySQL managed hosting starts at $65 per month. Most Linux distributions ship MariaDB as their default MySQL-compatible database.

Pros

  • +Drop-in replacement for MySQL with compatible connectors, SQL syntax and storage engine support
  • +Faster release cadence with features MySQL lacks, such as temporal tables, sequences and system-versioned tables
  • +Fully open-source under GPL without Oracle licensing risks or confusing edition differences
  • +ColumnStore engine for analytical workloads that MySQL does not natively support

Cons

  • -Slowly diverging from MySQL as newer MySQL 8.0+ features are not always adopted into MariaDB
  • -Smaller enterprise ecosystem than MySQL with fewer certified partners and third-party integrations
  • -SkySQL managed hosting is more expensive than comparable managed MySQL services on AWS or Google Cloud
Best for: Teams wanting to move away from Oracle ownership with minimal migration effort while gaining access to extra features like temporal tables, sequences and the ColumnStore engine for analytical queries.

SQLite

SQLite is an embedded relational database that operates as a single file with no separate server process or configuration. It is the most widely deployed database in the world, present in every mobile device, every web browser and countless IoT devices. SQLite is entirely public domain and maintained by D. Richard Hipp and a small core team. With the emergence of Turso and Litestream, SQLite is increasingly used as a production database for edge computing and lightweight web applications.

Pros

  • +Zero configuration: the database is a single file requiring no server process or installation steps
  • +Extremely lightweight and fast for read-heavy workloads with sub-millisecond response times
  • +Ideal for local development, automated testing and edge deployments via Turso or Cloudflare D1
  • +Public domain licence with absolutely no restrictions on usage, distribution or modification

Cons

  • -Not suitable for high write concurrency: only one writer at a time even in WAL mode
  • -No native network access or client-server architecture without tools like Turso or Litestream
  • -Lacks advanced features such as stored procedures, INSTEAD OF triggers and user-level access control
Best for: Embedded applications, mobile apps, CLI tools, local development environments and edge deployments where a lightweight database with minimal operational overhead is required.

PlanetScale

PlanetScale is a serverless MySQL-compatible database built on Vitess, the scaling layer originally developed for YouTube. It provides database branching for safe schema migrations, non-blocking schema changes, automatic connection pooling and horizontal scaling. The free tier was removed in April 2024, with the cheapest Scaler plan starting at $39 per month for 10 GB storage and 100 million row reads. PlanetScale Boost adds query caching for faster read operations on frequently accessed data.

Pros

  • +Database branching for safe schema migrations comparable to Git branches for application code
  • +Built on Vitess, proven technology that powers YouTube's database layer at massive global scale
  • +Serverless with automatic horizontal scaling that requires no manual sharding or rebalancing
  • +Non-blocking schema changes that do not slow down production queries during ongoing migrations

Cons

  • -No support for foreign keys due to fundamental limitations in the Vitess sharding architecture
  • -No free tier available since April 2024: minimum cost is $39 per month for the Scaler plan
  • -Limited to MySQL compatibility, meaning PostgreSQL-specific features and extensions are unavailable
Best for: Teams that require MySQL compatibility with serverless scalability, safe schema migrations through branching workflows and the proven reliability of Vitess technology at large scale.

CockroachDB

CockroachDB is a distributed SQL database designed for cloud-native applications with automatic sharding, multi-region replication and PostgreSQL wire compatibility. The CockroachDB Serverless tier provides 10 million free Request Units per month for small workloads. The Standard plan starts at approximately $0.50 per hour per node. CockroachDB guarantees serializable isolation by default, the strongest isolation level, and provides automatic failover without manual intervention when individual nodes fail.

Pros

  • +Automatic horizontal scaling and multi-region distribution without manual sharding or rebalancing logic
  • +Strong consistency with serializable isolation as the default setting for correct transaction processing
  • +PostgreSQL-compatible wire protocol: existing tools, drivers and ORMs connect and work without changes
  • +Serverless tier available with 10 million free Request Units per month suitable for development workloads

Cons

  • -Higher latency for single-node queries compared to standalone MySQL or PostgreSQL due to consensus overhead
  • -More complex operational debugging for smaller deployments where distribution is not actually needed
  • -Costs escalate quickly for larger workloads: the Standard plan is significantly more expensive than managed MySQL
Best for: Enterprise teams that need a distributed SQL database with automatic multi-region replication, high availability guarantees and strong consistency for mission-critical transactional applications.

Comparison at a glance

PostgreSQL offers the richest feature set with JSONB, CTEs, materialized views and over 1,000 extensions. MariaDB is the safest migration choice as a drop-in replacement with bonus features. PlanetScale delivers serverless MySQL branching powered by Vitess for teams needing horizontal scaling. SQLite fits perfectly for embedded, edge and local applications, while CockroachDB provides distributed SQL with automatic multi-region replication.

What to consider when switching?

  • Check whether your ORM, stored procedures and application code are compatible with the target database dialect
  • Compare performance benchmarks for your specific query patterns, write volumes and concurrency requirements
  • Evaluate available managed hosting options, associated costs and SLA guarantees for each platform
  • Assess the total migration effort including stored procedures, triggers, views and application code changes

Which alternative does MG Software recommend?

At MG Software, we recommend PostgreSQL as the default MySQL alternative thanks to its richer feature set, active independent community and complete absence of licensing risks. For teams that strictly require MySQL compatibility, MariaDB offers the safest migration path with minimal code changes.

Further reading

AlternativesLeaving PlanetScale after the free tier ended? SQL alternativesMongoDB Alternatives When Your Document Database Stops Scaling AffordablyPostgreSQL vs MySQL: Which Database Should You Choose?MySQL vs MariaDB: Oracle Backing or Community-Driven Fork?

Related articles

Leaving PlanetScale after the free tier ended? SQL alternatives

PlanetScale killed its free tier and restricts open-source MySQL features. Neon offers free serverless Postgres with branching, Supabase adds auth and storage.

PostgreSQL vs MySQL: Which Database Should You Choose?

The database you choose determines how your app scales. PostgreSQL and MySQL compared on advanced features, performance, and extensibility.

MongoDB Alternatives When Your Document Database Stops Scaling Affordably

Rising Atlas costs and schema flexibility working against you. Five databases that structure your data better without vendor lock-in.

Firebase Alternatives That Give You More Control Over Your Backend

Firebase is convenient, but vendor lock-in and unpredictable pricing push teams away. Compare Supabase, Appwrite, PocketBase and more on features, cost and freedom.

From our blog

Choosing the Right Database for Your Project

Sidney · 7 min read

Frequently asked questions

PostgreSQL offers more advanced SQL features including recursive CTEs, materialized views, JSONB with indexing and over 90 data types. MySQL is simpler to set up and can be faster for basic read-heavy workloads thanks to lower memory overhead. PostgreSQL excels for complex data models, while MySQL suits straightforward CRUD applications. The choice depends on your requirements for data type flexibility, query complexity and long-term scalability.
In most cases MariaDB works as a drop-in replacement for MySQL. Connectors, SQL syntax and storage engines are compatible. For complex stored procedures, MySQL-specific functions or features introduced after MySQL 8.0, thorough testing is recommended. MariaDB is slowly diverging from MySQL, so verify that your specific functions behave identically. For the vast majority of web applications the switch proceeds without any issues.
SQLite works excellently for read-heavy sites with limited concurrent writes. In WAL mode, read operations are not blocked by writes. Tools like Litestream provide streaming replication to S3 for disaster recovery, and Turso enables edge distribution of SQLite databases. SQLite is increasingly used in production for personal projects, blogs and applications with modest write concurrency. For high write volumes a client-server database like PostgreSQL remains the better choice.
AWS RDS MySQL starts at roughly $15 per month for a db.t3.micro instance. Managed PostgreSQL via Supabase starts free with 500 MB, Neon offers a free tier with 0.5 GB, and MariaDB SkySQL begins at $65 per month. PlanetScale starts at $39 per month following the removal of its free tier. CockroachDB Serverless provides 10 million free Request Units monthly. Total costs depend heavily on storage volume, compute requirements and data transfer.
Migrating from MySQL to PostgreSQL requires adjusting data types, SQL syntax and stored procedures. Tools like pgloader automate the bulk of data migration and type conversions. Test all queries thoroughly because functions like GROUP_CONCAT in MySQL become string_agg in PostgreSQL. AUTO_INCREMENT becomes SERIAL or GENERATED ALWAYS AS IDENTITY. Plan the migration in phases: schema conversion first, then data import, followed by query compatibility testing and finally a parallel validation period.
Yes, most tools and ORMs that support MySQL work directly with MariaDB. Popular ORMs including Prisma, TypeORM, Sequelize, Hibernate and Django ORM recognise MariaDB as a MySQL-compatible database. MySQL Workbench also works with MariaDB, though DBeaver or HeidiSQL may provide a smoother experience. Check whether your specific driver version supports MariaDB extensions like temporal tables or system-versioned tables.
CockroachDB is the better choice when your application requires multi-region availability, automatic failover and horizontal scaling without manual sharding configuration. It suits scenarios with strict consistency requirements and zero tolerance for downtime. For simple single-node applications without distribution needs, MySQL or PostgreSQL is more efficient and cost-effective. CockroachDB adds value when your team can handle the operational complexity of a distributed database.

Ready to switch?

We help you migrate to the right platform.

Discuss your options

Related articles

Leaving PlanetScale after the free tier ended? SQL alternatives

PlanetScale killed its free tier and restricts open-source MySQL features. Neon offers free serverless Postgres with branching, Supabase adds auth and storage.

PostgreSQL vs MySQL: Which Database Should You Choose?

The database you choose determines how your app scales. PostgreSQL and MySQL compared on advanced features, performance, and extensibility.

MongoDB Alternatives When Your Document Database Stops Scaling Affordably

Rising Atlas costs and schema flexibility working against you. Five databases that structure your data better without vendor lock-in.

Firebase Alternatives That Give You More Control Over Your Backend

Firebase is convenient, but vendor lock-in and unpredictable pricing push teams away. Compare Supabase, Appwrite, PocketBase and more on features, cost and freedom.

From our blog

Choosing the Right Database for Your Project

Sidney · 7 min read

MG Software
MG Software
MG Software.

MG Software builds custom software, websites and AI solutions that help businesses grow.

© 2026 MG Software B.V. All rights reserved.

NavigationServicesPortfolioAbout UsContactBlogCalculator
ServicesCustom developmentSoftware integrationsSoftware redevelopmentApp developmentSEO & discoverability
Knowledge BaseKnowledge BaseComparisonsExamplesAlternativesTemplatesToolsSolutionsAPI integrations
LocationsHaarlemAmsterdamThe HagueEindhovenBredaAmersfoortAll locations
IndustriesLegalEnergyHealthcareE-commerceLogisticsAll industries