TRUNCATE TABLE statement sometimes hangs
10
votes
7
answers
37306
views
Why does the
TRUNCATE TABLE
statement hang sometimes? What are the reasons for this type of issue?
I am migrating from MySQL to MariaDB. This problem doesn't happen with MySQL, only with MariaDB.
The hanging statement is simply:
TRUNCATE TABLE sampledb.datatable;
What can cause this to happen, and how could I fix it?
Another one observation is if the table have some data, may be one or two rows, then the truncate query works successfully. Else the table have a lot of data, query becomes hang.
Asked by Haseena
(571 rep)
Nov 2, 2012, 06:18 AM
Last activity: Nov 13, 2023, 09:43 PM
Last activity: Nov 13, 2023, 09:43 PM