There are 1000 product numbers. using the serial numbers to retrieve product details one by one and then write them into the database, the direct write operation will time out. What are the best methods ?? There are 1000 product numbers. using the serial numbers to retrieve product details one by one and then write them into the database, the direct write operation will time out. What are the best methods ??
Reply content:
There are 1000 product numbers. using the serial numbers to retrieve product details one by one and then write them into the database, the direct write operation will time out. What are the best methods ??
One-time intercept after obtaining all the information. if the data volume is too large, you can split it into several times and insert it in batches.
A better way is to store the product numbers (such as databases, redis, and memcahced), use crontab to regularly obtain several pieces of information each time and insert it into the database, and modify the storage ID status. It is rude to modify the php process time-limit field in the php environment configuration.