SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 28/04/2020, 01:24 PM   #11
Markski
Big Clucker
 
Markski's Avatar
 
Join Date: Apr 2015
Location: La Plata, Argentina
Posts: 133
Reputation: 59
Default Re: which is the maximum length of a string?

Quote:
Originally Posted by rockys View Post
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
Just do one query per player. I'd suggest you do it across several multiple formats though, for the sake of your mental sanity.

Quote:
Originally Posted by Banditul18 View Post
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
In order to know if something changed or not you'd probably need a second flag per every variable to see if they changed locally in the game or not, or to check against a select from the table. At best this isn't any better than just updating everything with a big query. At worst, this might actually be worse.

Updating a single row in a database is not an intensive task, even if you're updating 230 columns. Unsurprisingly, database engines are very good at database stuff, long as you have all your indexes done proper.
Markski is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Line length? String length? Denying Scripting Help 2 14/05/2014 07:04 PM
What is the maximum length for string Variable? yxliang Scripting Help 12 06/05/2013 01:55 PM
Isn't 128 the maximum length for sent client messages? 2KY Scripting Help 5 03/01/2013 06:41 AM
make a maximum name length...? sciman001 Help Archive 10 22/04/2011 07:50 PM
Pawn Maximum String Length? mprofitt Help Archive 3 25/11/2009 03:32 PM


All times are GMT. The time now is 05:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.