All pages
Powered by GitBook
1 of 1

Loading...

SQL Server Features Implemented Differently in MariaDB

Differences between features in Microsoft SQL Server and MariaDB.

Modern DBMSs implement several advanced features. While an SQL standard exists, the complete feature list is different for every database system. Sometimes different features allow achieving the same purpose, but with a different logic and different limitations. This is something to take into account when planning a migration.

Some features are implemented by different DBMSs, with a similar logic and similar syntax. But there could be important differences that users should be aware of.

This page has a list of SQL Server features that MariaDB implements in a different way, and SQL Server features for which MariaDB has an alternative feature. Minor differences are not taken into account here. The list is not exhaustive.

SQL

  • The list of supported is different.

  • There are relevant .

  • SNAPSHOT isolation level is not supported. Instead, you can use START TRANSACTION WITH CONSISTENT SNAPSHOT to acquire a snapshot at the beginning of the transaction. This is compatible with all isolation levels. See .

  • JSON support is .

Indexes and Performance

  • Clustered indexes. In MariaDB, the physical order of rows is delegated to the storage engine. InnoDB uses the primary key as a clustered index.

  • Hash indexes. Only some storage engines support HASH indexes.

    • The storage engine has a feature called adaptive hash index, enabled by default. It means that in InnoDB all indexes are created as BTREE, and depending on how they are used, InnoDB could convert them from BTree to hash indexes, or the other way around. This happens in the background.

Tables

  • Computed columns are called in MariaDB and are created with a different syntax. See also .

  • use a different (more standard) syntax on MariaDB. In MariaDB, the history is stored in the same table as current data (but optionally in different partitions). MariaDB supports both and .

  • Hidden columns are in MariaDB.

  • are implemented and used differently.

High Availability

  • NOT FOR REPLICATION

    • MariaDB supports to exclude some tables or databases from replication

    • It is possible to keep a table empty in a slave (or in the master) by using the .

    • The master can have columns that are not present in a slave (the other way around is also supported). Before using this feature, carefully read the

Security

  • The list of is different.

  • Security policies. MariaDB allows one to achieve the same results by assigning permissions on views and stored procedures. However, this is not a common practice and it's more complicated than defining security policies. See .

  • MariaDB does not support an OUTPUT clause. Instead, we can use and, since , and .

Other Features

  • Linked servers. MariaDB supports storage engines to read from, and write to, remote tables. When using the engine, those tables could be in different DBMSs, including SQL Server.

  • Job scheduler: MariaDB uses an to schedule events instead.

See Also

This page is licensed: CC BY-SA / Gnu FDL

The MEMORY storage engine uses hash indexes by default, if we don't specify the BTREE keyword.

  • See Storage Engine Index Types for more information.

  • Query store. MariaDB allows query performance analysis using the slow log and performance_schema. Some open source or commercial 3rd party tools read that information to produce statistics and make it easy to identify slow queries.

  • page.
  • With MariaDB it's possible to prevent a trigger from running on slaves.

  • It's possible to run events without replicating them. The same applies to some administrative statements.

  • MariaDB superusers can run statements without replicating them, by using the sql_log_bin system variable.

  • Constraints and triggers cannot be disabled for replication, but it is possible to drop them on the slaves.

  • The IF EXISTS syntax allows one to easily create a table on the master that already exists (possibly in a different version) on a slave.

  • pollinginterval option. See Delayed Replication.

  • data types
    differences in transaction isolation levels
    How Isolation Levels are Implemented in MariaDB
    different
    InnoDB
    generated columns
    Implementation Differences Compared to Microsoft SQL Server
    Temporal tables
    SYSTEM_TIME
    APPLICATION_TIME
    Invisible columns
    Temporary tables
    replication filters
    BLACKHOLE storage engine
    permissions
    Other Uses of Views
    DELETE RETURNING
    INSERT RETURNING
    REPLACE RETURNING
    CONNECT
    event scheduler
    SQL Server features not available in MariaDB
    Replication When the Master and Slave Have Different Table Definitions
    Cover

    Migrating from SQL Server?

    Contact our Migration Experts
    MariaDB 10.5