Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Is it a bad idea to send ~30 queries at once (threaded)?
Don't ask why I would do this (I'm likely not going to) I'm just wondering. I know sending 30 UN-threaded queries would be bad, but what if they're threaded? Would it have an impact on the database or what?
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Hardly. Consider that this forum sends about 14 queries every time a page loads, with more than 1000 users browsing the forum at this very moment.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
What about a remote connection?
Posts: 381
Threads: 12
Joined: Oct 2012
Reputation:
0
why dont u try and see? benchmark
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
It should still be fine, assuming there's a strong connection between the server sending the queries and the mySQL server itself.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Again, just wondering: Is it a bad idea to be sending ~50 queries per second, EVERY second? Again, I'm not really planning on doing this, I'm just curious.
Posts: 2,528
Threads: 124
Joined: Jul 2009
Reputation:
0
If there is any way to reduce the number of them (some merging, multiple updates in single query, unions or joined queries) better do it. However if your sql server isn't at $5 shared hosting it should keep up.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Another question regarding this..
I have many different scripts (by the 'end' of development there will be 50+ that use queries) and I was wondering: Is it best to load the data for those systems in one big query, or send one query per system?
For example, say I have a script for hidden packages (oysters, horseshoes, gangtags and photo ops). Should I load the data for which ones a player has found in that script, or in the main GM with the main player 'SELECT' query?
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
I would personally load them individually.