What Is New in MariaDB 10.9
MariaDB 10.9 brings a host of updates focused on performance, security, and new SQL capabilities. This release continues to build on the foundation of previous versions with incremental but important improvements.
| Category | Key Changes |
|---|---|
| New Features | Generated columns, System-versioned tables with history partitioning, UUID functions. |
| Improvements | InnoDB performance optimizations, better query statistics, enhanced GIS functionality. |
| Security | New password validation plugin, Oracle-compatible DBMS_RANDOM package. |
| Deprecations & Removals | Deprecation of InnoDB system tables, removal of the query cache. |
What are the key SQL enhancements in 10.9?
Generated columns are a major addition, allowing you to define columns whose values are computed from expressions involving other columns. This simplifies schema design by moving calculation logic from the application into the database itself.
System-versioned tables now support history partitioning. This lets you partition the historical data by time, which is a huge win for managing large volumes of temporal data and keeping table sizes manageable.
New functions like UUID(), UUID_TO_BIN(), and BIN_TO_UUID() provide standardized and efficient ways to generate and handle UUID values directly in your SQL queries.
How does 10.9 improve performance and monitoring?
Several InnoDB optimizations were introduced to reduce overhead. This includes improvements in flushing strategies and more efficient management of the buffer pool, which directly translates to better throughput under heavy write loads.
The introduction of the information_schema.QUERY_STATISTICS table is a game-changer for profiling. It exposes per-query performance metrics, making it far easier to pinpoint slow-running queries without external tools.
GIS functionality got a boost with faster spatial indexing and additional functions. For applications dealing with geospatial data, these optimizations can significantly speed up location-based queries.
What security updates should I be aware of?
The new simple_password_check plugin allows for basic password validation rules, such as enforcing a minimum length and checking for certain character types. It's a straightforward way to improve baseline password security.
For developers migrating from Oracle, the DBMS_RANDOM package provides compatibility for generating random numbers and strings. This makes porting applications that rely on this specific Oracle functionality much simpler.
What has been deprecated or removed?
The query cache, which was disabled by default in earlier versions, has been completely removed. The overhead of invalidating the cache often outweighed its benefits, and modern applications are better served by other caching layers.
Direct access to InnoDB internal system tables via the INNODB_ prefix in the information_schema is now deprecated. The preferred method is to use the INFORMATION_SCHEMA tables and Performance Schema for diagnostics and monitoring.
FAQ
Should I use generated columns instead of virtual columns in my application logic?
Generated columns are perfect for moving deterministic calculations into your schema, reducing application complexity. Use them for data derived from other columns, like a full name from first and last names. For highly volatile or complex logic, keeping it in the app might still be better.
How does history partitioning for system-versioned tables help with performance?
It allows you to partition the historical data by time ranges. This means you can easily archive or drop old history from a specific period without scanning the entire massive history table, making maintenance operations much faster.
Is the query cache removal going to impact my application's performance?
Probably not. The query cache was a source of contention and was often disabled in production. Its removal encourages the use of more efficient caching strategies, like using a dedicated caching service (Redis, Memcached) or optimizing your database and queries.
What should I use now that the INNODB_ system tables are deprecated?
Shift your monitoring and diagnostic scripts to use the standard INFORMATION_SCHEMA tables and the Performance Schema (performance_schema). These provide more standardized and detailed insights into InnoDB operation.
Are the new UUID functions compliant with RFC 4122?
Yes, the new UUID() function generates version 1 UUIDs that are compliant with RFC 4122. The UUID_TO_BIN() and BIN_TO_UUID() functions help in converting them for efficient binary storage and back.