It would be nice, if MariaDB has some way to index only subset of values / rows.
We have 1% of rows value set to "active" and 99% of rows set to "inactive". There is no need to index "inactive" rows. It would be similar to table scan. But indexing "active" rows would work well.
This feature is called Partial Index or Filtered Index in other databases.
Microsoft SQL Server:
Oracle (it can be created by Function-based index and fact that Oracle doesn't indexing NULL values):
There is no way to create this index in MySQL / Mariadb. Closest thing would be using another table and trigger. This complicate a lot of things and isn't much useful.
Feature request in MySQL: https://bugs.mysql.com/bug.php?id=76631