title: MySQL Error Code: 3 error writing file (Errcode: 28)
body: <p>I am trying to execute a query to return the number of records (which is around 4 millions). </p>
  
  <pre><code>SELECT COUNT(DISTINCT col) FROM table;
  </code></pre>
  
  <p>I am getting this error: 
  <code>mysql Error Code: 3 error writing file 'C:\Winows\temp\Myffd3.tmp' (Errcode: 28).</code></p>
  
  <p>What is the cause of the problem. How to fix it? I tried t search, It might seems a disk space issue ? But I have 21 GB free space in the C. Does count command fro one columns require more than this ?</p>
  
  <p><strong>EDIT:</strong>  : The temp file name is not permanent. Each time I execute the command, I get different name in the error message.</p>