title: Will a SQL update query using a WHERE IN clause containing potentially a lot of row id's that won't match be an performance issue?
body: <p>I have a list of inactive_products in an XML file.  I need to update the "active" (boolean) field of products I have in a DB based on the list of inactive products.  However, the list of inactive products contains a lot of products that are not even in my DB.  Will it be faster to just run an UPDATE statement using a WHERE IN clause with the entire list of inactive products, or should I compare the list of inactive products with a CSV file of active products first, to obtain the relevant inactive products, and then run an UPDATE statement with all this filtered list instead?</p>
  
  <p>My initial thought is that I should just let SQL do its thing and handle the unfiltered list, but what is the technically correct answer?</p>