I need to include some data to every page on my server. Every page would have to load data which is designed peculiarly for that page. It's plain text so i dont need database functionality. My problem is performance. I have 500k+ visits daily, which method would offer better performance: loading data from plain txt file or using database? I have googled on this, but didnt get any information that would answer my question. Anybody here have some experience in that case, or mayby some usefull links to benchmarks?
Your stuck just like me, I am developing a forum software and have no idea how to load the language files and things like censored words, settings, etc. It's too small for db, but too much for reading a file on every page. I hear ya.
Try using some combincation of data caching, component caching, and/or page caching.
I use data caching all the time with ASP.NET, useful for saving data objects (tables, arrays) instead of generating them from scratch from XML every single time. Not sure how/if that's implemented in PHP or other languages. For page caching, if you're using PHP check out one of the many available cache extensions: