From c9ddd26dec9ba36a19d1a55a788158d4ff6d8a40 Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Sat, 2 Oct 2010 03:49:32 +0100 Subject: [PATCH] ANALYZE after adds --- bin/id3fs-index | 2 ++ lib/ID3FS/DB.pm | 6 ++++++ 2 files changed, 8 insertions(+) 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; -- 2.11.0