How to avoid duplicates when you insert hundreds of thousands of entries into the same MySQL table