Whenever I try to empty a large table so using
truncate table the_huge_table;
and wait for several minutes, I see nothing take place. On the other hand I do not want to remove the entire table because not sure how to regenerate it so wondering what is the best way to easily empty this monster?
SHOW CREATE TABLE the_huge_table
will show you how to recreate the table if you drop it.
Another option is to clone the table structure:
CREATE TABLE cloned LIKE the_huge_table;
RENAME TABLE the_huge_table TO drop_me, cloned TO the_huge_table;
DROP TABLE drop_me;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With