I have a simple code that calls a flat file, checks lines, and if it does not find an entry, it appends it. I use it to write down the keywords. Every time a visitor comes, the file is opened, checked, written in if there was no keyword, and closed.
So far, depending on the site, the flat file has gone up to close to 1 MB. I'm just thinking that opening a file and checking so many lines from top to bottom is not so smart.
I'm kind of set to switch to MySQL, but I'm still curious about your experience with flat files vs. MySQL (in PHP environment). I know that the server performance is No.1, but still there must be more to it that drives web developers in making their decisions between flat file and database.
With the move to MySQL, I hope to get faster read/write, and to be able to count number of searches for keywords that are already in the database.