Raised This Month: $12 Target: $400
 3% 

Multithreading MySQL Module


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-12-2004 , 08:55   Multithreading MySQL Module
Reply With Quote #1

Is this a possiblity for AMX Mod X? I have loved MySQL but at the same time hated it because of how it functions. I hate how when you try to execute a query the server almost just stops until the call is done. So if you're ping to the MySQL server isn't great, then you're pretty much screwed and can't use it.

Is this a possibility?
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-14-2004 , 12:53  
Reply With Quote #2

*BUMP*
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-14-2004 , 14:18  
Reply With Quote #3

Tehre is already a mthread module over at amxmod.net, it worked pretty good.
Johnny got his gun is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-14-2004 , 14:48  
Reply With Quote #4

Nah, not if you want to call 32 sql statements.. IE: saving race information for 32 players at the end of each round. It would crash everytime. I tried EVERYTHING possibly on that module, it was not good at all.
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
BAILOPAN
Join Date: Jan 2004
Old 03-14-2004 , 15:06  
Reply With Quote #5

You can construct one mysql statement to do 32 operations.
__________________
egg
BAILOPAN is offline
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-14-2004 , 16:17   Who..
Reply With Quote #6

Quote:
Originally Posted by BAILOPAN
You can construct one mysql statement to do 32 operations.
Wanan share on how I knew it could be done but never done it... haven't did any programing in like atleast 5 years either I am getting rusty..
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-14-2004 , 22:07  
Reply With Quote #7

You can modify 32 different records in one statement? Ok that would be AWESOME!
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
BAILOPAN
Join Date: Jan 2004
Old 03-14-2004 , 22:46  
Reply With Quote #8

Sorry, I was being a little vague.

First: you should be able to concatenate multiple queries like this:
Query1; Query2; Query3; Query4; this lumping them all into one big string.

Otherwise, you can delete everything, and just use the extended insert syntax each round:
INSERT INTO db VALUES (set1) (set2) (set3) (set4) (set5) ... (set32)
__________________
egg
BAILOPAN is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 03-14-2004 , 23:02  
Reply With Quote #9

I tried doing 2 statements w/semicolons and it didn't work for me.
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
DopeFish
Senior Member
Join Date: Feb 2004
Old 03-15-2004 , 05:05  
Reply With Quote #10

Quote:
Originally Posted by BAILOPAN
Sorry, I was being a little vague.

First: you should be able to concatenate multiple queries like this:
Query1; Query2; Query3; Query4; this lumping them all into one big string.
that's still 32 SQL statements, they are just thrown out all at the same time and run after each other. not sure how efficient that would be compared to having the 32 statements all run at the same time. Kind of defeats the purpose of multithreading ;) since you have to wait for the statements all to finish when posting one whole chunk you have to hope the map doesn't change before it's done or else your plugin won't be there to handle the task being ended.

Quote:
Originally Posted by BAILOPAN
Otherwise, you can delete everything, and just use the extended insert syntax each round:
INSERT INTO db VALUES (set1) (set2) (set3) (set4) (set5) ... (set32)
that of course works but unfortunatly won't work with our problem. the DB contains multiple entries for each player (depending on how popular the server is, generally entries for a few thousand players). only the entries for the players currently playing need to be changed.
DopeFish is offline
Send a message via ICQ to DopeFish
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

Forum Jump


All times are GMT -4. The time now is 09:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode