diff options
author | Juha Sippola <juhasippola@outlook.com> | 2015-07-08 16:34:13 +0300 |
---|---|---|
committer | Tony SarajΓ€rvi <tony.sarajarvi@theqtcompany.com> | 2015-09-16 07:32:43 +0000 |
commit | 53b4d6210103d39850bb4f76ca63f541711fb0e9 (patch) | |
tree | 6ac9e396d21545bcee6b033d9c0260b12a8f7965 | |
parent | 11fac72f2efb71a50ad4b07ab9ed2317e8247269 (diff) |
Testparser: table indexes added
Indexes added for project_run, conf_run and testset_run
tables.
Change-Id: Idaf396c58fcb79a7b08d4f9433687df8936139d9
Reviewed-by: Tony SarajΓ€rvi <tony.sarajarvi@theqtcompany.com>
-rw-r--r-- | non-puppet/qtmetrics2/testparser.pl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/non-puppet/qtmetrics2/testparser.pl b/non-puppet/qtmetrics2/testparser.pl index 31daad4..0c535e3 100644 --- a/non-puppet/qtmetrics2/testparser.pl +++ b/non-puppet/qtmetrics2/testparser.pl @@ -1130,6 +1130,10 @@ sub sql_create_tables ); $dbh->do ( + "CREATE INDEX by_project_run ON conf_run (project_run_id DESC, result)" + ); + + $dbh->do ( "CREATE TABLE IF NOT EXISTS phase ( id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(100) NOT NULL, @@ -1185,6 +1189,14 @@ sub sql_create_tables ); $dbh->do ( + "CREATE INDEX by_timestamp ON project_run (timestamp, state_id, project_id)" + ); + + $dbh->do ( + "CREATE INDEX by_state ON project_run (state_id, project_id, timestamp)" + ); + + $dbh->do ( "CREATE TABLE IF NOT EXISTS state ( id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(30) NOT NULL, @@ -1259,6 +1271,18 @@ sub sql_create_tables ) ENGINE MyISAM" ); + $dbh->do ( + "CREATE INDEX by_conf_run ON testset_run (conf_run_id DESC, run, result)" + ); + + $dbh->do ( + "CREATE INDEX by_testset ON testset_run (testset_id, result)" + ); + + $dbh->do ( + "CREATE INDEX by_run ON testset_run (run, result)" + ); + $dbh->commit; # commit the changes if we get this far }; if ($@) { |