Questions about MySQL
#1

Hello!
I want to ask these questions about MySQL:

1) Which engine is the best for a SAMP server - InnoDB or MyISAM? (let's says that the server will work with a lot of data)

2) I saw that option POOL_SIZE in MySQL plugin declares the max queries which can be executed at once with mysql_pquery. The default value is 2, but if this value get increased will this decrease and overload the perfomance for the MySQL server?

3) If we declare a string in Pawn with contains 4 characters we need to declare that string with size [4 + 1] (+1 for the null terminator). But if we save the same string in database, does it need our field to be VARCHAR(4 + 1) or VARCHAR(4) is enough? I ask this question, because in one MySQL tutorial here I saw that the user uses CHAR(65) for password hash provided that the hash key is only 64 characters and I think we don't need +1 size since we only save those 64 characters in the database.
Reply
#2

1. Depends on the need. InnoDB is good for almost everything(especially for tables where there alot of writing/reading). But MyISAM i would say is perfect for only reading scenario(huge amount of readings)

2. The queries will not execute at once, they just execute in parallel so it might happen one of the queries being executed in front of the other. I see no real usage where you need more than 2-3 parallel queries(atleast in sa-mp)

3. True. MySQL can work with real size but i use the size of the pawn string just in case(you never know exactly how pawn will react when you retrive the string)
Reply
#3

Quote:
Originally Posted by Banditul18
View Post
1. Depends on the need. InnoDB is good for almost everything(especially for tables where there alot of writing/reading). But MyISAM i would say is perfect for only reading scenario(huge amount of readings)

2. The queries will not execute at once, they just execute in parallel so it might happen one of the queries being executed in front of the other. I see no real usage where you need more than 2-3 parallel queries(atleast in sa-mp)

3. True. MySQL can work with real size but i use the size of the pawn string just in case(you never know exactly how pawn will react when you retrive the string)
Thanks for the answers!
About the second question, I meant if POOL_SIZE is equal to 2 and I have 5 queries that will be excuted with mysql_pquery one after another, but the first two queries are large and need more time to be executed, that means the third query will have to wait one of the first two queries to finish and this will need more time for the 5 queries to be executed, but if POOL_SIZE is set to 5 this will reduce the time I think, right? And if the MySQL server runs 5 queries parallel than 2 does this mean that the server will be overload with more work and maybe decrese his perfomance?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)