A mysql data table contains a large amount of data, such as 10 million data records, occupying 5G space and inserting data into it. it is more efficient to regularly update the newly inserted data status. For example, I inserted 1000 data records into the table, and updated the status of the 1000 data records every 10 minutes. how can I improve the efficiency of a mysql data table with a large amount of data, such as 10 million data records, it occupies 5G space and inserts data into it. it is more efficient to update the newly inserted data status on a regular basis.
For example, I inserted 1000 entries into it, and updated the status of these 1000 entries every 10 minutes. how can I improve efficiency?
Reply content:
A mysql data table contains a large amount of data, such as 10 million data records, occupying 5G space and inserting data into it. it is more efficient to regularly update the newly inserted data status.
For example, I inserted 1000 entries into it, and updated the status of these 1000 entries every 10 minutes. how can I improve efficiency?
Similar to cron job
I don't know what the status means.
If it is a field in the table, update it according to the primary key.
The table has a large amount of data, and the update speed is related to the table index. If index is not involved in the update field and the update is based on the primary key, it should be fast, even if it is tens of millions of data
If you want to query the newly added 10 million entries in the 1000, it may be slow, depending on whether your query conditions are correctly indexed.