Ryancit2 Posted April 12, 2015 Share Posted April 12, 2015 Lekin phir bhi, it takes full-working-days, tumhain studies se dheyan hatana parega plus tum abhi itnay expert nahi ho k scripting k sath sath server performance ko b set rakho. Tumhain abhi scripting ati ho gi, maybe tum professional scripter ho lekin professionals bhi har maan jatay hain jab server performance kharab hoti hai. Maine Arran se server performance ki classes li theen, believe me its really hard to maintain it. Link to comment
Irish Posted April 12, 2015 Share Posted April 12, 2015 (edited) Post edited by MHS for some reason Edited April 24, 2015 by Guest Link to comment
RangeR.. Posted April 12, 2015 Share Posted April 12, 2015 May b yahi keh raha tha itni English ki zaroorat nahi Urdu board mai. lel Link to comment
RangeR.. Posted April 12, 2015 Share Posted April 12, 2015 Han aur ryan, muje server performance aati hai EDIT : Mera experience check kar lo bas scripting seekhny ka dil nahi karta tha baqi saqb kuch seekha hai 2008 say MTA player hun Link to comment
Ryancit2 Posted April 12, 2015 Share Posted April 12, 2015 Well, I never give up. I'm a well rounded, self-esteem person. If Arran did those performance classes, then how is it impossible for us to do it? I don't know why people think Arran a creature that only he can do everything well. You should know ke wohi akela player hai jis ne akelay 1 server ko 3 saloon se top par rakha hai, is ke pechay kuch reasons hain, wo zyada focus script ki performance par karta hai. Maine usay 1000+ lines long script di jis par community ne 100+ positive votes kiye thay, us ne semi-accept kar k mujhay bataya k dekhnay main script outstanding bhi ho lekin wo server ki performance ko kharab karti hai.Acha performance k related 1 simple question hai, tum database ko kesay use kartay ho server main? Yani entries update kesay kartay ho etc etc? Han aur ryan, muje server performance aati haiEDIT : Mera experience check kar lo bas scripting seekhny ka dil nahi karta tha baqi saqb kuch seekha hai 2008 say MTA player hun Apni server performance experience ke related meray sawal ka jawab do: Acha performance k related 1 simple question hai, tum database ko kesay use kartay ho server main? Yani entries update kesay kartay ho etc etc? Link to comment
Irish Posted April 12, 2015 Share Posted April 12, 2015 Acha performance k related 1 simple question hai, tum database ko kesay use kartay ho server main? Yani entries update kesay kartay ho etc etc? Jitne ziada database banao gay utni hi ziyda performance kharab hogi. So you should make one file of a database, and store all the values or strings in it. Then in other resource, if you want to update the entries you must have to use the export functions to update the values, strings, and also get in contact of the database you've created. Link to comment
Ryancit2 Posted April 12, 2015 Share Posted April 12, 2015 So tum dbExec use karo gay entries dalnay ke liye? Agar server 1 minute main 1000 entries ki request kar raha hai to kitnay tables honay chahiye db main? Link to comment
Irish Posted April 12, 2015 Share Posted April 12, 2015 Main ALTER TABLE use karunga for updating the existing column. Aur 1 minute main 1000 entries = 1000 tables obviously. Is tarha ke heavy database ke liye heavy system bhi hona zaroori hai. Link to comment
Ryancit2 Posted April 12, 2015 Share Posted April 12, 2015 Main ALTER TABLE use karunga for updating the existing column. Aur 1 minute main 1000 entries = 1000 tables obviously.Is tarha ke heavy database ke liye heavy system bhi hona zaroori hai. Probably that will ruin the performance even at good VPS hosts like CIT's. The correct answer was that you should make local tables in server side: dbTableName = { "dbColumn, entry", "dbColumn, entry", } This way, when script starts, call whole database table onResourceStart() -- I'll assume you have got a db table via dbQuery on resource start and name is table{} for k, v in pairs(table) do dbTableName[#dbTableName+1] = k..", "..v end Is tarha you have same entries as of database table but in local table within serverside, now you may call this table a 1000 times, this wont affect the performance, then onResourceStop, do this: -- I'll assume that you have dropped table from database file by 'DROP TABLE IF EXISTS' statement... -- Now you can call the dbTableName{} and save its entries by this: for k, v in pairs(dbTableName) do local val = split(v, ", ") dbExec( connection, "INSERT INTO table_name VALUES (?,?)", val[1], val[2] ) end This is called simple callBack, you just used dbExec two times within script and see, you have the same entries in dbTable plus server performance won't be affected even at poor VPS hosts and with 100 db calls a minute I hope that helped you with performance issues, there are tons of more issues like this... Link to comment
Irish Posted April 12, 2015 Share Posted April 12, 2015 I don't guess this would be a big deal because you've used the same procedure at the next part. Anyways, thank you for your opinion. I never learned anything unless I performed it. So I must step forward and do it in-order to discover the solutions to problems. EDIT: I guess there is no purpose for hosting a server in MTA:SA, but still I will think about it. Link to comment
RangeR.. Posted April 12, 2015 Share Posted April 12, 2015 PHPMyAdmin.. EXAMPLE EDIT : INSERT INTO tablenamE (col1, col2) VALUES('Data1', 'data2' ) Link to comment
Ryancit2 Posted April 12, 2015 Share Posted April 12, 2015 I don't guess this would be a big deal because you've used the same procedure at the next part. Compare your 'ALTER TABLE' sample with my pseudo using ingame performance browser, you'll see a huge difference if you call your sample 1000 times versus mine. Local tables won't even affect a single unit while 1000 entries call on each dbQuery would probably cause huge lag. Link to comment
Irish Posted April 12, 2015 Share Posted April 12, 2015 I considered your code correct. There is nothing to be compared about, as you've put the correct way of storing tables in a variable. Well, I will of course buy a VPS as soon as possible. Specs of server would be: 4GB RAM, 4 core CPU and 40GB SSD. I guess these specs are fine for now, as we can increase them when needed. I have many memberships in these kind of tut websites. Agar mujhy kuch na aye to tum ho na yar. Chalo aik try marte hain. Giving it a try won't harm us! Link to comment
BluntZ Posted August 16, 2015 Share Posted August 16, 2015 Bhaiyo mei idhr pehi baar Post krna lga hu , mujha nhi pta ap log help kro ga ka nhi , Mei Script chlane ki koshish kr raha hu "IVSE" but i dont know how to connect it to SQL/SQLTE/Db . I need Any professional Help Thanks in advance Link to comment
Bilal135 Posted January 29, 2016 Share Posted January 29, 2016 Discussion start kro, sab ki boltiyan band kyun ho gain? Hameu board ko active rakhna hai. Link to comment
TheSmart Posted May 10, 2017 Share Posted May 10, 2017 aaj kafi dinno baad aya ho ma wapis Link to comment
HydraLazy Posted August 26, 2020 Share Posted August 26, 2020 Aslam O Alakun 2020 ma kiya hoon ma or ap log mugh sa 3 4 saal porane Han. Koi ha Jo 2020 ma bhe ho Jo khalta ho?? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now