How to comparing existing data in mysql in a more efficient way?
<p>I have written a PHP web spider to get news title from a website.<br>
When I get the title, I will insert them into mysql.<br>
It really works when the first time.<br>
However, the jobs will run every hour.<br>
But later, I don't want to insert the duplicate data.<br>
So, I need to check every time when I insert to mysql.<br>
But I think it is not a good way to do so.<br>
Any better ideas?</p>
