I need a simple way for multiple running PHP scripts to share data.
Should I create a MySQL DB with a RAM storage engine, and share data via that (can multiple scripts connect to the same DB simultaneously?)
Or would flat files with one piece of data per line be better?
For the standard operations (view, edit, page revisions), holding the information in flat files is clearly faster than accessing them in a database, and with page caching abilities (coming soon) it'll be even faster.
31-20. We can see that reading data from MySQL is not always slower than reading data from pure filesystem. Especially in the case when small files are read first time, MySQL database is much faster than a pure filesystem.
Ultimately, speed will depend on the way you're using the database. PostgreSQL is known to be faster for handling massive data sets, complicated queries, and read-write operations. Meanwhile, MySQL is known to be faster with read-only commands.
They Require Fewer Hardware and Software Components. There's a good reason many operating systems, such as Windows, Macintosh, and Linux, use flat file databases. Though the databases can become bogged down with several thousand records, they are usually more efficient than other options.
Flat files? Nooooooo...
Use a good DB engine (MySQL, SQLite, etc). Then, for maximum performance, use memcached to cache content.
Keep in mind a couple things:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With