You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A friend of mine runs a Left 4 Dead 2 10v10 versus server and the SourceBans database is filled with way too many bans and gags.
What happens?
With the number of bans being really huge, once a player joins the game, when SourceBans performs the check "how many bans and gags the player has", it lags the server out for about a second or two, most likely due to the query that is being executed not utilizing any indexes, because it uses regex to filter bans and gags.
SELECTCOUNT(bid) FROM %s_bans WHERE ((type =0AND authid REGEXP '^STEAM_[0-9]:%s$') OR (type =1AND ip ='%s'))
UNIONSELECTCOUNT(bid) FROM %s_comms WHERE authid REGEXP '^STEAM_[0-9]:%s$'
Any other comments?
One thing that seems to have fixed it for the server I mentioned above was to rewrite the sbpp_checker query that retrieves the number of gags and bans once a player joins the game.
The text was updated successfully, but these errors were encountered:
I have made a PR based on what seems to have helped in this case. Another potential thing I can think of is creating an index on the type and ip column(s) in the sb_bans table. I haven't done that in the case of the #896 pull request
A friend of mine runs a Left 4 Dead 2 10v10 versus server and the SourceBans database is filled with way too many bans and gags.
What happens?
With the number of bans being really huge, once a player joins the game, when SourceBans performs the check "how many bans and gags the player has", it lags the server out for about a second or two, most likely due to the query that is being executed not utilizing any indexes, because it uses regex to filter bans and gags.
Any other comments?
One thing that seems to have fixed it for the server I mentioned above was to rewrite the sbpp_checker query that retrieves the number of gags and bans once a player joins the game.
The text was updated successfully, but these errors were encountered: