Changes for version 0.21 - 2026-10-06
- Connection registry: configure(name => {...}) + connect(name), one instance per name per process (rebuilt after fork)
- stream(): query() without loading the result set into memory (MariaDB/MySQL use_result; 200k rows: +45 MB -> +0 MB)
- cached(): tag invalidation shared across processes with an external backend (tag versions in the backend); DBIx::Fast::Cache::Redis backend over Redis::Fast. With an external backend, invalidate() now returns 1 instead of a per-process key count
- after_write => sub {...}: hook called after every CRUD write (audit)
- DBIx::Fast::Test::Mock: unit tests without a server (canned answers, real SQL of the chosen dialect, recorded statements)
- on_slow_query => { ms, cb }: report slow statements
- metrics => 1, metrics(), metrics_text(): statement counters, duration histogram and errors by class in Prometheus format
- configure_file(): registry connections from a JSON file
- Writes 32-42% faster than 0.20 (insert/update/delete/upsert) and all() 16-19% faster on SQLite; 5-11% on MariaDB: no per-write closures, fewer method calls, validated-identifier memo, rows built from the driver's C fetchall
- Pg: insert/insert_ignore return the id with INSERT ... RETURNING (one round trip; last_insert_id cost another: insert ~2x faster on Pg)
- val()/hash()/all() 31/24/9% faster than the first 0.21 build on SQLite: fast path for cached statements, and Connector::dbh's common case in a method touching 3 fields instead of 11 (Object::Pad binds every field a method mentions): 428 -> 282 ns per query
- Bounded caches (statements, CRUD SQL, identifiers) shed a quarter of their entries when full instead of emptying (no burst of misses)
- json_columns: write column sets memoized per table; reads decode only the configured columns the result actually has
- DBD::SQLite, Test::More, Test::Exception are test-only prerequisites (TEST_REQUIRES) - no longer installed for a runtime install
Modules
DBI fast & easy
Base class for DBIx::Fast components
Query result cache with TTL and tag invalidation
Redis backend for DBIx::Fast's result cache
Query proxy that caches results
DBIx::Fast connection manager fork safe
Unified output layer for the profiler subsystem
Abstract base class for database driver profiles
MariaDB/MySQL profiling and diagnostics
PostgreSQL profiling and diagnostics
SQLite profiling stub
MySQL profiling and diagnostics
Query profiling and statistics for DBIx::Fast
Lightweight row iterator for query results
Query and CRUD methods of DBIx::Fast
Schema introspection for DBIx::Fast
a DBIx::Fast with canned answers, for unit tests
Transaction management for DBIx::Fast
Typed exceptions for DBIx::Fast
Examples
- examples/README.md
- examples/benchmark-cache-backends.pl
- examples/benchmark-json.pl
- examples/benchmark-lazy-require.pl
- examples/benchmark-profiler-regex.pl
- examples/benchmark-query-cache.pl
- examples/benchmark-statement-cache.pl
- examples/errors-and-reads.pl
- examples/monitor-connections.pl
- examples/profiler-mariadb.pl
- examples/profiler-pg.pl
- examples/raw-sql.pl