| 
	
 | 
 Posted by Sιbastien on 03/14/06 05:23 
Hi, 
 
I have statistics on sales from several past months and years. 
Well actually all I have is my MysQL data tables, with datetime fields  
and corss references. 
 
So when I want to get the gross for sales in January 2006, I do a MySQL  
query, via PHP. 
 
But I will regularly want to check on the same figures for different  
months, and these figures won't change since the month is closed, so I'm  
starting to think it doesn't make a whole lot of sense always querying  
the DB when my results are pretty much static. 
 
I'm prety sure this is a very common problem, so I'd like to know the  
bet approach, if any. I can think of a few, like saving the results to a  
file, if I'm querying a past month, and then query the DB only if said  
results haven't been stored to file... 
 
But I'd like real professionals' points of views. Does it even make  
sense to "save" on queries like that? 
 
 
SΓ©bastien
 
  
Navigation:
[Reply to this message] 
 |