Comments - MySQL: Number of on-disk temporary tables created per second is high (over 10 for 5m)

2 months, 1 week ago Ian Gilfillan

The warning is because there are a large number of queries that require on-disk temporary tables to be created, which may not be ideal. You said you increased the sort_buffer_size (did you have a specific reason for trying this?) and enabled the slow query log, but it didn't help you. The slow query log by default should show you the problematic queries, which is a start in identifying what is going on. It could be poorly-indexed queries as well as non-optimal settings. Take a look at the description at tmp_table_size to get an idea of the ratio of tmp tables to tmp tables on disk. It may help to increase tmp_table_size and/or max_heap_table_size.

1 week, 6 days ago Branislav Dobrotka

Hi pls can I ask You if it is some tools or how to analyzed size of tmp_table_size amd max_head_table_size . I increased it gradually up to 2GB but still the some event fro zabix . Do you have any idea pls ?

thank you Brano

1 week, 5 days ago Daniel Black

Per aria_used_for_temp_tables the MEMORY STORAGE engine is used for temporary tables.

One of its restrictions is that it cannot support text/blob types (MDEV-19), and because of this, JOINs create with these tables will go to disk.

Using log_slow_filter=tmp_table_on_disk, long_query_time=0 and an enabled slow query log will identify which query is related.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.