I am running galera cluster (mariadb) with 2 nodes. We had one very large history table that I dropped and recreated only the structure for it from a mysqldump ever since then the database has been getting more and more sluggish.
Do I need to reboot my sql server cluster? Is the RAM still populated with history table data?
thanks
It would probably have been faster to do TRUNCATE TABLE
. This would keep the structure but remove the data.
DROP TABLE
has a delayed overhead on most Operating Systems. The OS spends some time freeing up the pieces of the file that represents that table. For 'small' tables this effort goes unnoticed. For a huge table, it may take minutes.
As for "more and more" sluggish, this could be a compounding of things being slowed down, then interfering with each other. Did you also note a large rise in Threads_running
?
You may need to keep an eye on the slowlog to see what queries are sensitive to this kind of interference. Then work on speeding up the slowest.