SA-MP Forums Archive
MySQL | vs | Flat File! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL | vs | Flat File! (/showthread.php?tid=384181)



MySQL | vs | Flat File! - Glint - 10.10.2012

Hello guys when i search through the forums i sometimes read that y_ini or INI is faster then MySQL i don't support this idea, but i just want to know if it is correct are there any speed tests ? Proving it ?


Re: MySQL | vs | Flat File! - AndreT - 10.10.2012

Fact is that the speed difference between the two (flat file storage and database file storage) is not important in most cases, but what you should use depends on what you want to do with the stored information.

For example, iterating through a list of users is really complicated when using multiple files. I mean, it is doable and can be scripted, but it will also be slow. Whereas, the same operation will most likely take like 10ms in the SQL server and the internal processor works with one, neatly indexed and laid out file, not multiple files.

However a badly tuned MySQL database/table is as bad as reading multiple huge flat-files in a loop! So watch out to optimize your creation!


Re: MySQL | vs | Flat File! - Glint - 11.10.2012

Quote:
Originally Posted by AndreT
Посмотреть сообщение
Fact is that the speed difference between the two (flat file storage and database file storage) is not important in most cases, but what you should use depends on what you want to do with the stored information.

For example, iterating through a list of users is really complicated when using multiple files. I mean, it is doable and can be scripted, but it will also be slow. Whereas, the same operation will most likely take like 10ms in the SQL server and the internal processor works with one, neatly indexed and laid out file, not multiple files.

However a badly tuned MySQL database/table is as bad as reading multiple huge flat-files in a loop! So watch out to optimize your creation!
So what is good from two from a small DM/TDM script ?


Re: MySQL | vs | Flat File! - denNorske - 11.10.2012

It all depends on amount of players in my opinion. Ini-files works well, but i am using MySQL because i believe that is faster.
However, it all depends on what use it is for.


Re: MySQL | vs | Flat File! - Sniper Kitty - 11.10.2012

Quote:
Originally Posted by Glint
Посмотреть сообщение
So what is good from two from a small DM/TDM script ?
Files should do you fine, easy to edit and most file includes (Such as Y_INI) are user-friendly.

If you want leaderboards on a website, then MySQL is the way to go my friend, but it's a bit more advanced.


Re: MySQL | vs | Flat File! - Glint - 11.10.2012

OK guys thanks for all of the responses.

Rep'ed