PDA

View Full Version : Too many conditions in mysql query - is efficient?



Fli
09-22-2013, 05:16 PM
Hello, please is this efficient querry or how to make it more simple/efficient, can you give an example? thx


DELETE FROM `phpbb_posts` WHERE ( `post_text` LIKE '%zithrom%' OR `post_text` LIKE '%forex%' OR `post_text` LIKE '%treatment%' OR `post_text` LIKE '%diet%' OR `post_text` LIKE '%nutrition%' OR `post_text` LIKE '%chlamydia%' OR `post_text` LIKE '%cialis%' OR `post_text` LIKE '%prescription%' OR `post_text` LIKE '%Jelly%' OR `post_text` LIKE '%pharma%' OR `post_text` LIKE '%genuine%' OR `post_text` LIKE '%purchase%' OR `post_text` LIKE '%handbags%' OR `post_text` LIKE '%jerseys%' OR `post_text` LIKE '%Obama%') LIMIT 20000;

(this mysql query deletes certain mysql rows from table phpbb_posts where it meets search criteria in column post_text)