I am using a code that fetch 100 items from a website and insert it into the database if the item exists it updates that record. It runs as a cron job every minute. It runs upto 50000 products.
The script works good and products are imported successfully. The problem now is the server and MySql load. My server support said that it takes almost 50% of the resources and they need to disable that script.
I tried google to check for a solution and find that Load file is better choice than mysql_query insert and updates. So I am planning to write all queries in a txt file on the server and once completed import it to db using load file.
Is it a good method? or it is also taking the same server load? I want to know the expert's decision before proceeding. Please help. Thanks