MySQL and MariaDB disk temp tables per second alert


The Disk Temp Tables Per Second alert notifies you when its configured condition is met on MySQL and MariaDB instances so you can investigate and respond.

Screenshot pending: Mini DBA MySQL and MariaDB Disk Temp Tables Per Second alert screenshot placeholder

Alert summary

  • Platform: MySQL and MariaDB
  • Alert category: Query
  • Default enabled: false
  • Default evaluation frequency: Minute
  • Threshold label: Disk temp tables/sec
  • Unit: tables/sec

What Mini DBA checks

Mini DBA describes this alert as: MySQL is creating temporary tables on disk. Disk-based temp tables are much slower than memory temp tables and often point to large sorts, grouping, or insufficient temp table memory settings. Mini DBA evaluates this alert once a minute so changes are detected quickly. Because duration is used, Mini DBA can avoid treating a single short spike as a full incident when the condition clears quickly.

How this alert helps

This alert shows that MySQL or MariaDB is creating temporary tables on disk. Disk-based temporary work is slower than memory work and often points to large sorts, grouping, or insufficient temporary-table memory limits rather than a backup or retention problem.

When to enable it

Enable it once the instance has a normal workload baseline. It is especially useful on busy OLTP, reporting, and integration systems where resource pressure can quickly become user-visible.

Threshold guidance

Threshold meaning: Disk temp tables/sec. Major threshold: 10 tables/sec. Minor threshold: 2 tables/sec. Comparison direction: over. Duration is used, so prefer requiring the condition to persist before paging people for transient spikes. For an over-threshold alert, decreasing a threshold makes that severity fire sooner; increasing it tolerates more load or pressure. Set the minor threshold as an early-warning level and the major threshold at the highest acceptable value for the service.

Remediation for an active alert

Identify statements creating disk temporary tables, review their joins, sorts, grouping, row widths, and execution plans, and compare tmp_table_size and max_heap_table_size with available memory. Tune the workload or settings carefully; simply adding free disk space does not remove the spill cause.

Investigation workflow

  1. Confirm the disk-temporary-table rate and the queries active during the alert window.
  2. Review execution plans, sort and grouping operations, result widths, and temporary-table limits.
  3. Check memory headroom before increasing per-session limits, because concurrency multiplies their effect.
  4. Recheck both spill rate and query latency after the change.

Avoiding alert noise

Use a sustained rate and a busy-workload baseline so isolated administrative statements do not page the team. Keep visibility when disk temporary tables rise with user-facing query latency.

Related pages