Posts: 100
Threads: 18
Joined: Jan 2010
Reputation:
0
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 ?
Posts: 1,317
Threads: 23
Joined: Feb 2010
Reputation:
0
I would go for one huge, no specific reason. It just sounds better.
Posts: 6,129
Threads: 36
Joined: Jan 2009
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.
Posts: 6,129
Threads: 36
Joined: Jan 2009
Quote:
Originally Posted by Sergei
You call updating three fields a huge query?
|
He has three types - integer, string & float. Not three fields.
Posts: 100
Threads: 18
Joined: Jan 2010
Reputation:
0
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.