SQL Server Features Implemented Differently in 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

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 InnoDB 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.
    • 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.

Tables

High Availability

  • 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, carefully read 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.
    • 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.

Security

Other Features

  • 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.
  • Job scheduler: MariaDB uses an event scheduler to schedule events instead.

See Also

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.