View Single Post
Old 04-02-2009, 09:27 PM   #12 (permalink)
Village Idiot
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by allworknoplay View Post
Hmmm very interesting, I thought that the flat file would have been faster just because it seems a bit more "raw" if you know what I mean. I'm not sure what code I would use but it would probably be fopen to open the file, and probably just a loop to count the lines.....

I wonder what the overhead is for that versus the DB....

Just a hypothetical question though, not that I am looking to replace my DB or anything....
If you are looking for a raw piece of text, it might be faster to search raw text, but it will without a doubt be more memory intensive because those functions tend to load it all into memory. If you are looking for anything more advanced than that, a database is probably your best bet.

You see, searching through raw text looks though every bit of it, SQL uses more advanced techniques so it doesn't have to do such a low level comparison.
__________________

Village Idiot is offline  
Reply With Quote
The Following User Says Thank You to Village Idiot For This Useful Post:
allworknoplay (04-02-2009)