Re: MySQL optimization for testing purpose
Tested with:
tmp_table_size = 512M
max_heap_table_size = 512M
But this did not help...
Note that I get similar symptoms with different versions of MySQL 8.0, 5.7 ( and MariaDB 10.3! ) ...
So I believe there is quite a serious problem in the server code. You might want to try to reproduce on your side with pure SQL, with a script that repeats CREATE TABLE, INSERT 1 row, SELECT the row, DROP TABLE. If you cannot repro, change the column type in CREATE TABLE statements, to cover all possible MySQL types...
Just a thought: Is it possible that the server detects that a process is going crazy by creating and dropping the same table many times, and decides to allocate less SQL processing by design? Or prevent attacks or so?
Seb