Faster DB
Faster DB collects performance tuned clones of the Drupal core database drivers. Each driver is a drop in replacement for its core counterpart and only changes how the connection is opened. Everything else behaves exactly the same, so switching back is as simple as removing a few lines from settings.php.
Features
One driver is included at the moment: mysqlfast, a clone of the core mysql driver for MySQL and MariaDB. It keeps the connection open between requests (persistent connections), sends the session setup once per physical connection instead of on every request, and issues a ROLLBACK when a pooled connection is picked up in case a previous request died mid transaction.
Connection setup is around 80% faster on MariaDB and 87% on MySQL 8. Pages served from the internal page cache load 10 to 19% faster. Fully rendered pages see no real difference, because the driver does not make queries faster, only getting the connection. Use it on sites with a lot of anonymous traffic served from the page cache. The whole Database kernel test group of Drupal core passes against this driver.
A pgsqlfast driver for PostgreSQL is planned.
Post-Installation
No configuration page, and the module does not need to be enabled. After composer require drupal/fasterdb, point the default connection at the driver in settings.php:
$databases['default']['default']['driver'] = 'mysqlfast';
$databases['default']['default']['namespace'] = 'Drupal\fasterdb\Driver\Database\mysqlfast';
$databases['default']['default']['autoload'] = 'modules/contrib/fasterdb/src/Driver/Database/mysqlfast/';
$databases['default']['default']['dependencies']['mysql'] = [
'namespace' => 'Drupal\mysql',
'autoload' => 'core/modules/mysql/src/',
];
To go back to the core driver, remove the block. Before production, make sure max_connections on the database server covers the total number of PHP-FPM workers, since each worker keeps one connection open. The module ships bench.php and verify.php in its scripts folder to test on your own platform.
Additional Requirements
Nothing beyond Drupal core. Works with MySQL and MariaDB on Drupal 10, 11 and 12.
Recommended modules/libraries
The core Internal Page Cache and Internal Dynamic Page Cache modules. The speedup shows up on requests those modules serve.
Supporting this Module
File bugs and feature requests in the issue queue. Benchmark results from other platforms and database versions are welcome.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.x-dev | Dev | 10–11 | Sep 2, 2026 |