Baidu know-MySQL delete massive data MySQL database delete the optimization of large quantities of data see here, and finally look at this article, for the operation of massive data SQL deep analysis cnblogs-depth analysis drop,truncate and delete difference " My Database Road Series "DZH Project massive data Delete actual combat, read the above article, consider truncate can only delete data, the table is not deleted, I used a drop Need to remove the rest of the table except the Dzh_weibo_cache Dzh_weibo_cache--2000wdzh_weibo_cache111--1500wDzh_weibo_cache2--400wDzh_weibo_cache3--700wAs a result of the following operations, drop is convenient and fast for deleting massive data tables mysql> show tables;
+---------------------------+
| Tables_in_dzh_crawl_weibo |
+---------------------------+
| Dzh_weibo_cache |
| dzh_weibo_cache111 |
| Dzh_weibo_cache2 |
| Dzh_weibo_cache3 |
+---------------------------+
4 rows in Set (0.00 sec)
mysql> DROP TABLE dzh_weibo_cache2;
Query OK, 0 rows affected (8.50 sec)
Mysql> Show tables;
+---------------------------+
| Tables_in_dzh_crawl_weibo |
+---------------------------+
| Dzh_weibo_cache |
| dzh_weibo_cache111 |
| Dzh_weibo_cache3 |
+---------------------------+
3 Rows in Set (0.00 sec)
mysql> DROP TABLE Dzh_weibo_cache3;
Query OK, 0 rows affected (10.85 sec)
Mysql> Show tables;
+---------------------------+
| Tables_in_dzh_crawl_weibo |
+---------------------------+
| Dzh_weibo_cache |
| dzh_weibo_cache111 |
+---------------------------+
2 rows in Set (0.00 sec)
mysql> DROP TABLE dzh_weibo_cache111;
Query OK, 0 rows affected (18.84 sec)
MySQL Massive data removal