Mind_nl
Wed 13 December 2006, 07:56 pm GMT +0100
Now that I know how to download a file with curl I have to process the file and update my database with the values of the new download. The process will be updating about 5 to 20 thousand records in one table and adding 20 thousand new records to another.
Just processing the 7.5 MB file and displaying the records on screen takes about 1.5 minutes. Does anybody have any idea on what I can expect on how long the updating of the database could take?
A couple of minutes is not too bad, but visitors could see some weird things when they would visit during the update, so my idea is this: if I keep 2 versions of the database, the visitors will see the first while the second is being updated. After the update has finished I can have the site switch over to use the updated database and the update process can run again on the first database. This way, no matter how long the update takes, the visitors will never encounter a database that is in the process of being updated.
Am I taking this too far? Is there a better way to handle this? Should I just do the update and forget about the potential visitor during the update?
Just processing the 7.5 MB file and displaying the records on screen takes about 1.5 minutes. Does anybody have any idea on what I can expect on how long the updating of the database could take?
A couple of minutes is not too bad, but visitors could see some weird things when they would visit during the update, so my idea is this: if I keep 2 versions of the database, the visitors will see the first while the second is being updated. After the update has finished I can have the site switch over to use the updated database and the update process can run again on the first database. This way, no matter how long the update takes, the visitors will never encounter a database that is in the process of being updated.
Am I taking this too far? Is there a better way to handle this? Should I just do the update and forget about the potential visitor during the update?