SA-MP Forums Archive
MySQL queries, many or one and huge ? - 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: MySQL queries, many or one and huge ? (/showthread.php?tid=173172)



MySQL queries, many or one and huge ? - actiwe - 01.09.2010

I made three callbacks - one for updating int, another one to update float and last one to update string. Now I have question: Is one and huge MySQL UPDATE query better and faster or little ones are better ?


Re: MySQL queries, many or one and huge ? - playbox12 - 01.09.2010

I would go for one huge, no specific reason. It just sounds better.


Re: MySQL queries, many or one and huge ? - Calgon - 01.09.2010

Creating several large queries could lead to overloading the database/server, the best thing to do is to create 1 large query for what you're doing, instead of running a query for every variable you wish to update.

Quote:
Originally Posted by playbox12
Посмотреть сообщение
I would go for one huge, no specific reason. It just sounds better.
Don't post if you don't understand what you're talking about. Although you were right in this instance.


Re: MySQL queries, many or one and huge ? - Sergei - 01.09.2010

You call updating three fields a huge query?


Re: MySQL queries, many or one and huge ? - Calgon - 01.09.2010

Quote:
Originally Posted by Sergei
Посмотреть сообщение
You call updating three fields a huge query?
He has three types - integer, string & float. Not three fields.


Re: MySQL queries, many or one and huge ? - actiwe - 01.09.2010

I have like 70 fields. And yes three types.

I made about 70 queries and then looked from the log that it took 3-4 seconds with remote MySQL. I'll try huge query then.