diff --git a/database/queries.md b/database/queries.md index 0d4eb7234..c7f9ce2e4 100644 --- a/database/queries.md +++ b/database/queries.md @@ -1,7 +1,7 @@ # Useful queries This document contains useful queries that should be performed manually in exceptional situations. -## Remove data for an artifact from the DB +## Remove data for a stable artifact from the DB This is important for situations where there is some compilation error for a stable benchmark, with a stable release of the compiler. While this should be rare, it happens sometimes e.g. because of future incompatibility lints turning into errors. @@ -19,3 +19,17 @@ WHERE name IN ('1.69.0', '1.70.0') AND type = 'release'; ``` After executing this query, the server should automatically re-benchmark these artifacts again. + +## Remove data for a master/try artifact from the DB +This is similar to removing a stable artifact, however it also has to be removed from the +`pull_request_build` table. + +```sql +DELETE FROM artifact +WHERE name = ""; + +DELETE FROM pull_request_build +WHERE bors_sha = ""; +``` +After that, the server has to be restarted, or you have to send a GET request to its `/perf/onpush` +endpoint.