title: PHP read file vs MySql query
body: <p>Here is the plan. I have a large CSV file extract from a DB with 10 000  entry. Those entry look like : </p>
  
  <ul>
  <li>firstname</li>
  <li>lastname</li>
  <li>tel</li>
  <li>fax</li>
  <li>mobile</li>
  <li>address</li>
  <li>jav-2012-selltotal</li>
  <li>fev-2012-selltotal</li>
  <li>etc.. etc..</li>
  </ul>
  
  <p>So, i have read about getting those CSV data to MySQL database, and query those database to know who have sold more in feb 2012, or what is the selling total of john.. or whatever i ask to...</p>
  
  <p>But for optimization purpose, caching, optimizing and indexing query is a must... witch lead me to this question. Since i know the 2-3 query i will do ALL THE TIME to the DB... is it faster to take the CSV file, to make the request in PHP and write a result file on disk, so all my call will be readfile-load-it, display-it ?</p>
  
  <p>another wording of the question...is making query to DB is faster or slower that reading file to disk ? because if the DB have 10 000 record, and the result of the selling of paul is 100 line, the file will ONLY contain 100 lines, it will be small... the query will always take about the same time </p>
  
  <p>PLease help, i dont what to code it myself just to discover thing that is evident to you...
  thanks in advance</p>