• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

DB Tax question?

Dangnoob

Member
Joined
Jun 8, 2008
Messages
105
Solutions
2
Reaction score
12
Hey! I was curious as to how much running a sql query actually taxes the server? Like if they are spammed it will lag right? Or is that not a thing? I was just curious because i plan to store a bunch of values into the DB, 1 or 2 per player (lets say for say 80 players), but then grab all those values at once and do a script with them. Would that cause some serious lag? Or maybe just like half a second? Or none at all?
 
Solution
Hey! I was curious as to how much running a sql query actually taxes the server? Like if they are spammed it will lag right? Or is that not a thing? I was just curious because i plan to store a bunch of values into the DB, 1 or 2 per player (lets say for say 80 players), but then grab all those values at once and do a script with them. Would that cause some serious lag? Or maybe just like half a second? Or none at all?
Depends on how often you will execute it. If it will be often, it's usually good practice to onStartup load the variables into a global array and use/alter the array variables while server is online. Then when server is shutdown load them back onto the database.

If it's only a one time thing, as long as you write...
Hey! I was curious as to how much running a sql query actually taxes the server? Like if they are spammed it will lag right? Or is that not a thing? I was just curious because i plan to store a bunch of values into the DB, 1 or 2 per player (lets say for say 80 players), but then grab all those values at once and do a script with them. Would that cause some serious lag? Or maybe just like half a second? Or none at all?
Depends on how often you will execute it. If it will be often, it's usually good practice to onStartup load the variables into a global array and use/alter the array variables while server is online. Then when server is shutdown load them back onto the database.

If it's only a one time thing, as long as you write the SQL query with best possible performance you should be alright. Although only way to find out for sure is to test it.
 
Last edited:
Solution
Back
Top