From: Ian Beckwith Date: Sat, 2 Oct 2010 02:49:32 +0000 (+0100) Subject: ANALYZE after adds X-Git-Tag: debian/1.0-1~143 X-Git-Url: http://erislabs.net/gitweb/?p=id3fs.git;a=commitdiff_plain;h=c9ddd26dec9ba36a19d1a55a788158d4ff6d8a40 ANALYZE after adds --- diff --git a/bin/id3fs-index b/bin/id3fs-index index cff0990..af8fee3 100755 --- a/bin/id3fs-index +++ b/bin/id3fs-index @@ -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 diff --git a/lib/ID3FS/DB.pm b/lib/ID3FS/DB.pm index e09e754..15855b2 100644 --- a/lib/ID3FS/DB.pm +++ b/lib/ID3FS/DB.pm @@ -138,6 +138,12 @@ sub checkschema } } +sub analyze +{ + my $self=shift; + $self->cmd("ANALYZE"); +} + sub enable_foreign_keys { my $self=shift;