title: Is php or sql faster for basic operations
body: <p>I wanted to know that when given the option, is it faster to do processing with php or mysql?
  For example, lets say that I want to concatenate two values from two columns should I do </p>
  
  <pre><code>SELECT col1,col2 FROM table WHERE conditions
  </code></pre>
  
  <p>And then concatenate in php</p>
  
  <p>or should I do</p>
  
  <pre><code>SELECT CONCAT(col1,col2) as concatenated FROM table WHERE conditions
  </code></pre>
  
  <p>and then not have to concatenate?</p>
  
  <p>Another example would be limiting the size of returned strings which can be done in sql with LEFT or in php using substr</p>
  
  <p>If they are the same speed then which is the prefered method?</p>
  
  <p>I am using recent version of xampp on a windows 7 machine.</p>