Updated Database management (markdown)

Risto Lahtela 2021-08-25 14:24:53 +03:00
parent 05a1160ef3
commit f6a4d723ed

@ -50,6 +50,12 @@ Maybe you have multiple servers in your network so `/plan db clear` is not good
A bot attack usually messes up the peak calculations. Removing that data needs manual SQL query to the database.
Removing bot users who did not join game servers:
```sql
DELETE FROM plan_users WHERE uuid NOT IN (SELECT DISTINCT uuid FROM plan_sessions);
```
Removing bad tps data:
```sql
DELETE FROM plan_tps WHERE date>{start} AND date<{end} AND players_online>{above value};
```
@ -58,6 +64,8 @@ Replace the variables in `{square brackets}` (remove the brackets as well)
- `end` is [epoch millisecond](https://currentmillis.com/) of the end time of the attack
- `above value` should be above 0, use it to further limit what data is removed.
## Removing ALL data
To remove all data run `/plan db clear`.