ANALYZE after adds
authorIan Beckwith <ianb@erislabs.net>
Sat, 2 Oct 2010 02:49:32 +0000 (03:49 +0100)
committerIan Beckwith <ianb@erislabs.net>
Sat, 2 Oct 2010 02:49:32 +0000 (03:49 +0100)
bin/id3fs-index
lib/ID3FS/DB.pm

index cff0990..af8fee3 100755 (executable)
@@ -64,6 +64,8 @@ else
        print "$me: removing data from pruned files\n" if $verbose;
        $db->remove_unused();
     }
+    print "$me: analyzing db\n" if $verbose;
+    $db->analyze();
 }
 
 sub wanted
index e09e754..15855b2 100644 (file)
@@ -138,6 +138,12 @@ sub checkschema
     }
 }
 
+sub analyze
+{
+    my $self=shift;
+    $self->cmd("ANALYZE");
+}
+
 sub enable_foreign_keys
 {
     my $self=shift;