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

[MYSQL] BUG


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Groger
Veteran Member
Join Date: Oct 2009
Location: Belgium
Old 09-15-2011 , 12:02   [MYSQL] BUG
Reply With Quote #1

Okay, so I got a really weird bug or something I dont know. I hope someone can make sense of it.

Basicly I have a jihad plugin that stores some data about the jihad bomber and by a simple query we have a TOP5 jihad bombers. (!bombtop)

This is the code:
PHP Code:
public Action:Command_Top(clientargs)
{
    
SQL_TQuery(g_hDatabaseSQLCallback_Top"SELECT * FROM jihad_top ORDER BY kills DESC LIMIT 0, 5"client);
    return 
Plugin_Handled;

Now, when I install this on my clean vanilla sourcemod test server it works perfectly. But however when I install this on my main jail server it goes very very slow the !bombtop command that is.

The mysql itself is fine, not slow or anything. My cpu load doesnt go above 70% on one core.

sm plugins list:
Code:
           01 "Map configs" (1.1.1) by Berni
           02 "Web Shortcuts" (1.0.1) by James "sslice" Gray
           03 "SM SKINCHOOSER" (2.1) by Andi67
           04 "TeamSwitch" (1.3) by MistaGee
           05 "Sample Last Request - Shotgun Wars" (1.0.0) by databomb
           06 "Simple Chat Colors" (1.1.0) by Simple Plugins
           07 "SQL Admins (Threaded)" (1.3.6) by AlliedModders LLC
           08 "Forlix DeadChat" (1.16) by Forlix (Dominik Friedrichs)
           09 "Player Trails" (3.0.2.1) by Twisted|Panda modified by databomb
           10 "Voice Comm" (2.1.0) by databomb
           11 "MapChooser" (1.3.8) by AlliedModders LLC
           12 "Sound Commands" (1.3.8) by AlliedModders LLC
           13 "SteamID Auto-Fill for Donor Interface" (1.0) by Zephyrus
           14 "Enter server sound" (1.4) by Kemsan
           15 "Global Special Effects Options" (1.0.0) by databomb
           16 "Player Commands" (1.3.8) by AlliedModders LLC
           17 "Set Health" (1.2.2) by Mr. Blip
           18 "Map Nominations" (1.3.8) by AlliedModders LLC
           19 "Players Votes" (1.5.0) by The Resident, pZv!
           20 "Country Filter 2nd Edition" (2.0.4) by Bacardi
           21 "CT Ban" (1.4.4) by databomb
           22 "SM_Hosties v2" (2.0.1b) by databomb & dataviruset
           23 "Nextmap" (1.3.8) by AlliedModders LLC
           24 "Show Damage" (1.0.7) by exvel
           25 "SQL Admins (Prefetch)" (1.3.8) by AlliedModders LLC
           26 "Func_Door Fix" (2.1) by Zephyrus
           27 "Late joiner spawn" (1.0) by Jannik "Peace-Maker" Hartung
           28 "Player-Teleport by Dr. HyperKiLLeR" (1.2.0.0) by Dr. HyperKiLLeR
           29 "Round end slay" (1.0) by mad_hamster
           30 "CTrun" (1.3SM) by Eun
           31 "Fun Votes" (1.3.8) by AlliedModders LLC
           32 "Grenade Trails" (2.0.2) by databomb
           33 "Basic Chat" (1.3.8) by AlliedModders LLC
           34 "Jailbreak Team Balance" (3.0.4) by databomb
           35 "Accessories" (1.0.1) by Zephyrus
           36 "[CS:S] Give Cash" (1.0.0) by DarthNinja
           37 "Basic Commands" (1.3.8) by AlliedModders LLC
           38 "Gun Spam Abuse Prevention" (1.0.8) by databomb
           39 "Admin Menu" (1.3.8) by AlliedModders LLC
           40 "Banana Bombs" (1.1) by Steell
           41 "Advertisements" (0.5.5) by Tsunami
           42 "Player Respawn" (1.2) by Rogue
           43 "Fun Commands" (1.3.8) by AlliedModders LLC
           44 "SM File/Folder Downloader and Precacher" (1.4) by SWAT_88
           45 "Anti-Flood" (1.3.8) by AlliedModders LLC
           46 "Jihad Mod" (1.0) by Zephyrus
           47 "SourceBans" (1.4.8) by SourceBans Development Team
           48 "Rock The Vote" (1.3.8) by AlliedModders LLC
           49 "Admin Help" (1.3.8) by AlliedModders LLC
           50 "Reserved Slots" (1.3.8) by AlliedModders LLC
           51 "Basic Votes" (1.3.8) by AlliedModders LLC
           52 "AdminConnectmsg" (0.0.3) by R-Hehl
           53 "Basic Info Triggers" (1.3.8) by AlliedModders LLC
           54 "Ban disconnected players" (1.03) by mad_hamster
           55 "Basic Comm Control" (1.3.8) by AlliedModders LLC
           56 "Client Preferences" (1.3.8) by AlliedModders LLC
           57 "Admin File Reader" (1.3.8) by AlliedModders LLC
Thanks in advance
Roger
Groger is offline
Groger
Veteran Member
Join Date: Oct 2009
Location: Belgium
Old 09-15-2011 , 13:03   Re: [MYSQL] BUG
Reply With Quote #2

I dont get it why its been moved to scripting? it has nothing to do with scripting
Groger is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 09-15-2011 , 13:03   Re: [MYSQL] BUG
Reply With Quote #3

Don't know if this solves your speed problem, but you only have to do LIMIT 5 to show the first 5 results and you should always pass the userid into asyncronous callbacks! You got a primary key in that table, right?

PHP Code:
SQL_TQuery(g_hDatabaseSQLCallback_Top"SELECT * FROM jihad_top ORDER BY kills DESC LIMIT 5"GetClientUserid(client)); 
__________________
Peace-Maker is offline
Groger
Veteran Member
Join Date: Oct 2009
Location: Belgium
Old 09-15-2011 , 13:16   Re: [MYSQL] BUG
Reply With Quote #4

Zephyrus wrote the plugin, I have no idea about the primary key. He did told me it has nothing to do with the speed problem.
Groger is offline
mikes3ds
Member
Join Date: Jul 2005
Location: CA
Old 09-17-2011 , 19:55   Re: [MYSQL] BUG
Reply With Quote #5

That is a simple mySQL call it should not effect it to much; however, like Peace-Maker said you should have a primary key. But I highly doubt that is the issue.


My advice is to disable that command and re-code it your self.
__________________
[img]http://img529.**************/img529/3995/omg6gp.png[/img]
mikes3ds is offline
Reply



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 22:42.


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