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-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aa43f8eee701e5ffd8144b1ec3868be1ab411cf3;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 ("