Add index on crash_time (it is used to sort the index page)
authorVincent Tondellier <tonton+hg@team1664.org>
Sat, 12 Sep 2015 01:12:44 +0200
changeset 73 25df7947e5da
parent 72 ec517ae81b39
child 74 e7eda506a66f
Add index on crash_time (it is used to sort the index page)
lib/CrashTest/Storage/Sql/Schema/Result/CrashReport.pm
--- a/lib/CrashTest/Storage/Sql/Schema/Result/CrashReport.pm	Sat Sep 12 00:00:43 2015 +0200
+++ b/lib/CrashTest/Storage/Sql/Schema/Result/CrashReport.pm	Sat Sep 12 01:12:44 2015 +0200
@@ -54,10 +54,14 @@
 sub sqlt_deploy_hook {
     my ($self, $sqlt_table) = @_;
     $sqlt_table->add_index(
-        name => 'crash_reports_idx_uuid',
+        name => 'crash_reports_uuid_idx',
         fields => [ 'uuid' ],
         type   => 'unique',
     );
+    $sqlt_table->add_index(
+        name => 'crash_reports_crash_time_idx',
+        fields => [ 'crash_time' ]
+    );
 }
 
 1;