add a key on ( history_action, $primary_key ) to the h_ tables. this should speed...
authorivan <ivan>
Mon, 19 May 2008 04:29:01 +0000 (04:29 +0000)
committerivan <ivan>
Mon, 19 May 2008 04:29:01 +0000 (04:29 +0000)
FS/FS/Schema.pm

index 457e5c8..9e7b07f 100644 (file)
@@ -192,6 +192,14 @@ sub dbdef_dist {
                         }
                         keys %indices;
 
+    $h_indices{"h_${table}_srckey"} = DBIx::DBSchema::Index->new({
+                                        'name'    => "h_${table}_srckey",
+                                        'unique'  => 0,
+                                        'columns' => [ 'history_action', #right?
+                                                       $tableobj->primary_key,
+                                                     ],
+                                      });
+
     my $h_tableobj = DBIx::DBSchema::Table->new( {
       'name'          => "h_$table",
       'primary_key'   => 'historynum',