SQL Server features implemented differently in MariaDB

You are viewing an old version of this article. View the current version here.

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 to achieve the same purpose, but with a different logic and different limitations. This is something to keep 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 kept into account here. The list is not exhaustive.

  • The list of supported data types is different.
  • There are relevant differences in transaction isolation levels.
  • JSON support is different.
  • Temporary tables are implemented and used differently.
  • The list of permissions is different.
  • Security policies. MariaDB allows 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.
  • 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.
    • InnoDB 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 background.
    • MEMORY 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 tool read that information to produce statistics and make it easy to identify slow queries.
  • Linked servers. MariaDB supports storage engines to read from, and write to, remote tables. When using the CONNECT engine, those tables could be in different DBMSs, including SQL Server.
  • NOT FOR REPLICATION
    • MariaDB supports replication filters 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 BLACKHOLE storage engine.
    • The master can have columns that are not present in a slave (the other way around is also supported). Before using this feature, read carefully the Replication When the Master and Slave Have Different Table Definitions 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.

See also

  • [[sql-server-features-not-available-in-mariadb|SQL Server features not available in MariaDB]

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.