Posts: 48
Threads: 20
Joined: Oct 2018
Reputation:
0
which is the maximum length of a string for a query
like
mysql_format
or format
string[2048] ? or 4096 or bigger?
Posts: 257
Threads: 1
Joined: Feb 2012
Reputation:
0
Why do you need such a big string size ?
Posts: 48
Threads: 20
Joined: Oct 2018
Reputation:
0
i make a optimized save system, save all variables in database after 5 6 minutes on server.
if you save all data always you have a lot of queries, and queries affect the server
Posts: 485
Threads: 11
Joined: Sep 2014
Reputation:
0
Well actually i think it's completely the opposite. Sending multiple short queries is way more efficient than having a huge query run every 5 - 6 minutes. Imagine having to send a 512 or even 1024 sized query for 100 players at the same time. The server won't really appreciate it.
Posts: 485
Threads: 11
Joined: Sep 2014
Reputation:
0
It’s even worse imo.. but you do you lel
Posts: 133
Threads: 1
Joined: Apr 2015
Reputation:
0
Having a huge query to save account flags in a single table is fine. It's not ideal, but it's *fine*. Long as you know what you're doing the worst thing that'll happen is it just being annoying to work with.
As for the question, the limit for how long a string can be is so large it should not matter (and if you do reach it, the compiler will let you know). Of course, certain natives which utilize strings will have smaller limits. For those you should check the Limits in the afforementioned Limits wiki link, or in case of a plugin, it's documentation.
Posts: 48
Threads: 20
Joined: Oct 2018
Reputation:
0
So how to do?
1 2 3 query with 230 variables or 230 query?
You have have 100 players you have 23000 queries on 5 minute
Or 100 queries on 5 minute
I think one is good
Posts: 408
Threads: 40
Joined: Nov 2014
Reputation:
0
A better question is, do those variables are changing in same time? Or do they mean same thing? Because you can just update the variable only when it changes. I doubt a player admin level or player level changes so often or needs to be saved every so often