The query specificly is this one (the values may vary), which tries to check if there's a possibly related/identical result, from a table with about 200.000 rows, before adding it to the database:
Code: Select all
SELECT * FROM news
WHERE (title = 'Budget cuts' AND DAYOFMONTH(date) = '01')
OR (website = '2' AND date = '2013-03-01 19:31:00')
OR (description = 'Politics trumped progress on Friday as President Barack Obama and Republican leaders traded blame for $85 billion in forced spending cuts after they failed to come up with a compromise to avert the harshest impacts.<div class="feedflare">rn<a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=NYRG0dCyBUM:8EDIynVrkcU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=NYRG0dCyBUM:8EDIynVrkcU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=NYRG0dCyBUM:8EDIynVrkcU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?i=NYRG0dCyBUM:8EDIynVrkcU:V_sGLiPBpWU" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=NYRG0dCyBUM:8EDIynVrkcU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=NYRG0dCyBUM:8EDIynVrkcU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?i=NYRG0dCyBUM:8EDIynVrkcU:gIN9vFwOqvQ" border="0"></img></a>rn</div><img src="http://feeds.feedburner.com/~r/rss/cnn_topstories/~4/NYRG0dCyBUM" height="1" width="1"/>')
OR (link = 'http://rss.cnn.com/~r/rss/cnn_topstories/~3/NYRG0dCyBUM/index.html')
LIMIT 1
Can you give me a hand? Thanks!