Is it MySQL, SQLite3, or serializing .sl?? I find .sl much easier and faster, thoughts on which should I use? I want the fastest...
MySQL hosted locally and having enough resources to run at it's peak. SQLite3 works as well. With databases (especially server-oriented ones like MySQL) the queries are usually ran asynchronously to avoid latency issues (and other things like your queries being queued in cases where the structure of the table you're querying is being modified). Flat file databases aren't really a good alternative to databases. I'd say flat files are fine if you're storing something that doesn't grow over time (like a configuration file, loot tables for crates/kits etc). But if it does grow over time, then I don't think it's going to be fast at all. You could use a whole file as an index like pocketmine does with players/, considering filenames are indexed in folders (I'm not really sure how file systems work, I might be wrong here) but you'll still need to: > read from file > unserialize > write to file which is CPU intensive. Period. You might be caching the serialized data when the player joins, and then writing to file when the player quits, but that doesn't make .sl the fastest. Once you transfer data to RAM, any read writes to RAM isn't contributing to the performance of .sl. You can essentially do the same thing with MySQL and yet have MySQL beat .sl in read-writes by 100x if not more ¯\_(ツ)_/¯.
They are used for different purposes. Use .sl if you only want to load/save a bulk of data. Use sqlite if you want to search data with other methods, e.g. if you want to search all players in a team, find the top 10 kills players, etc. Use MySQL if you want to do something like sqlite and/or share the data among multiple servers or with your website etc.