Availability lookup, 21 November 2026 (Europe/Paris)
MariaDB 11.8.10, database query cache OFF (size 0). These were read-only tests on the running instance. Timings vary with concurrent activity and cache state.

Data distribution: 3,791 ts_variable rows, 3,759 distinct names, 3,791 distinct (name, from) pairs. 30 names occurred more than once, with a maximum of 3 rows per name. mysql_available had one row with and without the source predicate. At measurement time SHOW INDEX estimated cardinality 3,841 for both index prefixes. These are estimates, while the preceding counts are exact. EXPLAIN estimated one row on ts_variable in both plans.

discover: eight query shapes, one execution per shape per server, 50 random servers from 111 yielding a non-null value. confirm: six shapes on a fresh draw of 50, three repetitions. finalist: six shapes on another draw of 50, three repetitions. Servers may overlap between draws. In each experiment shapes were rotated through shuffled blocks to balance the order. Each comparison used one read-only REPEATABLE READ transaction. SQL values and row counts had to agree for all shapes in a comparison. Extra controls covered eight absent or NULL results per experiment. SHOW PROFILES measured server-side statement time. The database was already serving traffic, and the eligibility check exercised the full-key query. No cache flush was performed.

services: independent check of the deployed join and the scalar lookup on every available probe type. Each qualifying server was tested twice, once in each order. Service coverage and mean/median times appear in services.json. The edge count includes inactive, nonexistent or missing-measurement examples, depending on the service. MaxScale and MaxScale Service had no positive-result cases on this instance.

analyze-measurements.csv: independent instrumented samples on the confirm set, random order within each server, one execution per variant. optimization_ms and execution_ms are MariaDB ANALYZE FORMAT=JSON fields measured in separate executions from the latency benchmarks. stage-measurements.csv: another independent instrumented pass over those same 50 servers. Statistics is the named SHOW PROFILE stage. Stage times and ANALYZE times come from separate executions and must not be added to the production metrics.

Anonymous server numbers are consistent within one experiment and service. They are independently remapped for separate draws. No server identities or availability values are included. All statement timings are milliseconds.

Production figures in the post come from the two-hour before/after deployment study. Only the source predicate was deployed in that study. The scalar lookup and index hints below are benchmark alternatives. In the finalist series the deployed query averaged 0.617 ms, while the scalar lookup averaged 0.546 ms. In the discovery series the means were 0.692 ms and 0.694 ms. No live rollout of the scalar query was measured.

Source article: https://www.pmacontrol.com/en/site/blog_post/mariadb-disponibilite-index-unique/
MariaDB plan reference: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/explain
MariaDB timing reference: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/analyze-format-json

cardinality.sql and cardinality.tsv contain the read-only GROUP BY queries and results for ts_variable. The statistics rows report index estimates for comparison. The sample was taken on 21 November 2026 at 21:25 CET.

statistics-refresh.tsv compares SHOW INDEX, InnoDB prefix statistics, GROUP BY and single-table EXPLAIN before and after the local ANALYZE of pmacontrol.ts_variable at 21:30 CET. analyze-result.tsv is the maintenance result. cardinality-after.tsv contains the repeated group counts.
