Need to Clear Out Stoneridge Data From Datazilla

RESOLVED FIXED

Status

Data & BI Services Team
DB: MySQL
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: jeads, Assigned: sheeri)

Tracking

Details

(Reporter)

Description

5 years ago
Nick Hurley discovered some issues with the data generated for the stoneridge project.  These issues have been resolved but obsolete the data received to date.  We would like to clear out the test data in the stoneridge schema and start with a clean slate.  We need to execute the following statements on stoneridge_perftest_1 on the datazilla master database.


USE `stoneridge_perftest_1`;
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `stoneridge_perftest_1`.`test_page_metric`;
TRUNCATE TABLE `stoneridge_perftest_1`.`test_option_values`;
TRUNCATE TABLE `stoneridge_perftest_1`.`test_aux_data`;
TRUNCATE TABLE `stoneridge_perftest_1`.`test_value`;
TRUNCATE TABLE `stoneridge_perftest_1`.`test_run`;
TRUNCATE TABLE `stoneridge_perftest_1`.`build`;
TRUNCATE TABLE `stoneridge_perftest_1`.`product`;
TRUNCATE TABLE `stoneridge_perftest_1`.`machine`;
TRUNCATE TABLE `stoneridge_perftest_1`.`summary_cache`;
TRUNCATE TABLE `stoneridge_perftest_1`.`test_collection_map`;
TRUNCATE TABLE `stoneridge_perftest_1`.`test_collection`;
SET FOREIGN_KEY_CHECKS = 1;
(Assignee)

Comment 1

5 years ago
stoneridge_perftest_1 is a small db - but I have backed it up manually, just in case:

[root@datazilla1.db.scl3 ~]# du -sh /var/lib/mysql/stoneridge_perftest_1/276K	/var/lib/mysql/stoneridge_perftest_1/
[root@datazilla1.db.scl3 ~]# mysqldump stoneridge_perftest_1 > stoneridge_perftest_1.sql
[root@datazilla1.db.scl3 ~]# gzip !$
gzip stoneridge_perftest_1.sql
[root@datazilla1.db.scl3 ~]# 

And then I ran the requested statements on the master:

MariaDB [stoneridge_perftest_1]> USE `stoneridge_perftest_1`;
Database changed
MariaDB [stoneridge_perftest_1]> SET FOREIGN_KEY_CHECKS = 0;
Query OK, 0 rows affected (0.00 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`test_page_metric`;
Query OK, 0 rows affected (1.85 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`test_option_values`;
Query OK, 0 rows affected (0.98 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`test_aux_data`;
Query OK, 0 rows affected (0.98 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`test_value`;
Query OK, 0 rows affected (1.33 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`test_run`;
Query OK, 0 rows affected (1.49 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`build`;Query OK, 0 rows affected (1.31 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`product`;
Query OK, 0 rows affected (0.48 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`machine`;
Query OK, 0 rows affected (0.72 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`summary_cache`;
Query OK, 0 rows affected (0.96 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`test_collection_map`;
Query OK, 0 rows affected (0.44 sec)

MariaDB [stoneridge_perftest_1]> TRUNCATE TABLE `stoneridge_perftest_1`.`test_collection`;
Query OK, 0 rows affected (0.45 sec)

MariaDB [stoneridge_perftest_1]> SET FOREIGN_KEY_CHECKS = 1;
Query OK, 0 rows affected (0.00 sec)
Assignee: server-ops-database → scabral
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Product: mozilla.org → Data & BI Services Team
You need to log in before you can comment on or make changes to this bug.