Here is the plan. I have a large CSV file extract from a DB with 10 000 entry. Those entry look like :
- firstname
- lastname
- tel
- fax
- mobile
- address
- jav-2012-selltotal
- fev-2012-selltotal
- etc.. etc..
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...
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 ?
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
PLease help, i dont what to code it myself just to discover thing that is evident to you... thanks in advance