From: Marco van Wieringen Date: Tue, 6 Nov 2012 13:29:19 +0000 (+0100) Subject: Fix bug #1946 Fix problem with MySQL with big Base jobs. X-Git-Tag: Release-7.0.0~85 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e6e4ef8f7f6e83d140355d7a03688fbfa8c84fc;p=bacula%2Fbacula Fix bug #1946 Fix problem with MySQL with big Base jobs. This patch adds an index on the temporary table "basefilesXXX", where XXX is the JobId. This index reduce heavily the time for full backups with big BaseJobs with bacula 5.2 and MySQL backend. --- diff --git a/bacula/src/cats/sql_cmds.c b/bacula/src/cats/sql_cmds.c index 65354d6a7f..6ebcb6280b 100644 --- a/bacula/src/cats/sql_cmds.c +++ b/bacula/src/cats/sql_cmds.c @@ -465,7 +465,8 @@ const char *create_temp_basefile[] = { /* Mysql */ "CREATE TEMPORARY TABLE basefile%lld (" "Path BLOB NOT NULL," - "Name BLOB NOT NULL)", + "Name BLOB NOT NULL," + "INDEX (Path(255), Name(255)))", /* Postgresql */ "CREATE TEMPORARY TABLE basefile%lld ("