Home > Back-end > 2021-01-19: mysql, a table with 300 million data, not table, one of the fields is the enterprise typ
2021-01-19: mysql, a table with 300 million data, not table, one of the fields is the enterprise typ
Time:01-20
The 2021-01-19: mysql, a table with 300 million data, not table, one of the fields is the enterprise type, type is general enterprises and self-employed, soho the amount of data about 50%, according to the condition of the soho rows deleted, could you tell me how to operate? # # f greatly architects a daily topic
CodePudding user response:
1. To build a temporary table, just like the original table structure, the primary keys, indexes are removed In the table 2. The original enterprise user's data is inserted into the new table 3. The primary key of the new table, index build 4. The original table deleted or renamed, change the new table to the name of the original table