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

CodePudding user response:

reference 1st floor kkkkk0lllll 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, the new table instead of the original table name


Is that right, say it directly to delete, not insurance, keep to the whole evening, or write a regular task
  • Related