What would be faster for this? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What would be faster for this? (
/showthread.php?tid=274424)
What would be faster for this? -
Whizion - 05.08.2011
So let's say i have a need to search all of the accounts on my server for a specific value.
Would it be faster to do it by opening files (if it was a .ini system) or by a query (if it was a MySQL system)?
Im asking this because i will have that need in the future, and if my need is done faster by MySQL i would switch to it.
I hope you understand what i meant...
Re: What would be faster for this? -
Tigerkiller - 05.08.2011
switch to mysql it is very nice, very fase and you can make some functions!
and i can help you by making a mysql system
Re: What would be faster for this? -
Vince - 05.08.2011
Executing a single (threaded) query in a database will definitely be faster than opening every ini file and checking for a value. If you have a popular server, the registered accounts can run into the 10,000. Opening them all would lag your server for quite some time.
Re: What would be faster for this? -
Sasino97 - 05.08.2011
I use .ini files because I can't understand MySQL, but MySQL is faster
Re: What would be faster for this? -
Tigerkiller - 05.08.2011
for all im making a tutorial for a mysql reg system with enum tomorrow
Re: What would be faster for this? -
Whizion - 05.08.2011
Thanks for the answers, i have one more question.
What would be an average time of a query that needs to search 10000+ accounts in ms?
Please provide some estimate...
Re: What would be faster for this? -
Scarred - 05.08.2011
100 - 200ms, i'm ASSUMING. Remember, this is an assumption, and is probably nowhere near correct. You could easily check this by creating a simple script and executing a query searching for one value 10,000 times, and then using gettickcount(); to check for the time.
Re: What would be faster for this? -
Whizion - 07.08.2011
Thanks.