Hi Tom
REPLACE INTO has, in my view, outlived it's usefulness with successive releases of mysql. (as well as rewriting the primary key if used)
If you have a unique key on your table and in your data, then INSERT INTO will just miss out existing rows, UPDATE will update the existing rows, whereas REPLACE INTO will delete the existing row, then create a new one (which is both memory hungry, and, where the primary key gets changed, unless you don't have an autonumber PK).
In essence, it's not really useful any more.
Tony
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks