Mysql database 1400 + tables, slow to create new tables

there is a database for storing user behavior data, which has been divided into more than 1450 tables, and the amount of data in it is so large that the command line use database cannot be accessed for a long time. However, it is very fast to configure host and account password database names with nodejs code, and then create connections, and you can quickly list data tables with code query ("show tables").

now the problem is that creating a new sub-table is very slow, extremely slow, how to solve it?

Mar.17,2021

then change the configured table_cache from 512 to 2000

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bc70-2739b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bc70-2739b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?