title: MySql Update query without where clause vs with where clause
body: <p>I am trying to reset some values in a large table having around 4 million records.</p>
  
  <p>I just wanted to know which approach is better:</p>
  
  <pre><code>UPDATE TABLENAME SET VAL1=0, VAL2=0, VAL3=0;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>foreach ( $catIds as $catId )
      execUpdate("UPDATE TABLENAME SET VAL1=0, VAL2=0, VAL3=0 WHERE CAT_ID='".$catId."';");
  </code></pre>
  
  <p>So the actual question is that is it safe to run it all at-once or the update should be broken into chunks?</p>
  
  <p>Regards</p>