From aa43f8eee701e5ffd8144b1ec3868be1ab411cf3 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Tue, 6 Nov 2012 14:29:19 +0100 Subject: [PATCH] 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. --- bacula/src/cats/sql_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 (" -- 2.39.5