A query creating an internal temporary table that exceeded the in-memory limit on every execution, silently.
-- the counter that made it visible
SHOW GLOBAL STATUS LIKE 'Created_tmp%';
Created_tmp_tables 412,884
Created_tmp_disk_tables 408,102 -- 98.8%
-- the cause: a TEXT column in the SELECT list of a
-- query with a GROUP BY. before 8.0.28 any BLOB or
-- TEXT forced an on-disk temporary table regardless
-- of size.
-- removing the column from the projection: 1.8s → 40ms
The ratio of disk to memory temporary tables is the diagnostic and it is a global status variable nobody looks at. A column that is selected and never used is the usual cause, and the fix is a projection change rather than a configuration one — raising tmp_table_size would have moved the problem into memory pressure.