From d73f6cf23e14213b838602d8fa42ba7258f2d877 Mon Sep 17 00:00:00 2001 From: janw Date: Thu, 24 Apr 2008 10:19:43 +0000 Subject: [PATCH] Do a vacuum to reduce the db filesize. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10669 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index f389e5f43..dd29fd8a7 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1747,7 +1747,8 @@ sub create_fai_release_db { daemon_log("$session_id DEBUG: Inserting ".scalar @sql_list." entries to DB",8); if(@sql_list) { - unshift @sql_list, "DELETE FROM $table_name"; # at first, clear db + unshift @sql_list, "VACUUM $table_name"; # at first vacuum the logs and clear the db + unshift @sql_list, "DELETE FROM $table_name"; $fai_release_db->exec_statementlist(\@sql_list); } daemon_log("$session_id DEBUG: Done with inserting",7); @@ -2202,8 +2203,10 @@ sub parse_package { # Use empty lines as a trigger if ($line =~ /^\s*$/){ + my $sql2 = "INSERT INTO packages_list VALUES ('$dist', '$package', '$version', '$section', '', 'none', '$timestamp')"; my $sql = "INSERT INTO packages_list VALUES ('$dist', '$package', '$version', '$section', '', 'none', '$timestamp')"; push(@packages_list_statements, $sql); + push(@packages_list_statements, $sql2); $package = "none"; $version = "none"; $section = "none"; -- 2.30.2