SQL regular update optimization

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.