Thread: Website is slow
View Single Post
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-12-2018 , 05:56   Re: Website is slow
Reply With Quote #10

It may help, which you will only find out by trying, however, as noted above:

Quote:
Originally Posted by Doulos View Post
Note: This will only delete the data from the sb_bans table, there may be other data for that player in other tables.
Only 1/4th of the data appears to be deleted, as there are cross references in other tables:

Quote:
Originally Posted by SnowHP View Post
Its possible to remove very old bans that have expired easly?
RemoveType does (normally!) equal NULL for bans you (or other admins) haven't touched, so unless you have a heavily customized SourceBans(++) or DB, you can do the following quick-made queries:

1. DELETE FROM sb_banlog WHERE bid IN (SELECT bid FROM sb_bans WHERE RemoveType IS NOT NULL)
2. DELETE FROM sb_comments WHERE bid IN (SELECT bid FROM sb_bans WHERE RemoveType IS NOT NULL)
3. DELETE FROM sb_protests WHERE bid IN (SELECT bid FROM sb_bans WHERE RemoveType IS NOT NULL)
4. DELETE FROM sb_bans WHERE RemoveType IS NOT NULL

Be sure to run the 4th with "DELETE FROM sb_bans" as the very last one, when all the other "references" have been run and deleted.

Quote:
Originally Posted by SnowHP View Post
Will this fix the lag?
There is absolutely no guarantee.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline