From: Eric Bollengier Date: Wed, 16 Jun 2010 09:35:18 +0000 (+0200) Subject: Improve performance for MySQL with update stats command X-Git-Tag: Release-7.0.0~1759 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=119fd8ad30755349d4e41249a022855aea562750;p=bacula%2Fbacula Improve performance for MySQL with update stats command --- diff --git a/bacula/src/cats/make_mysql_tables.in b/bacula/src/cats/make_mysql_tables.in index 7fc01b3126..9fcd97ee90 100644 --- a/bacula/src/cats/make_mysql_tables.in +++ b/bacula/src/cats/make_mysql_tables.in @@ -181,6 +181,7 @@ CREATE TABLE JobHisto ( HasCache TINYINT DEFAULT 0, Reviewed TINYINT DEFAULT 0, Comment BLOB, + INDEX (JobId), INDEX (StartTime) ); diff --git a/bacula/src/cats/update_mysql_tables.in b/bacula/src/cats/update_mysql_tables.in index 22db77c3f4..f1b5e16463 100644 --- a/bacula/src/cats/update_mysql_tables.in +++ b/bacula/src/cats/update_mysql_tables.in @@ -42,6 +42,8 @@ CREATE TABLE RestoreObject ( INDEX (JobId) ); +CREATE INDEX jobhisto_jobid_idx ON JobHisto (JobId); + DELETE FROM Version; INSERT INTO Version (VersionId) VALUES (13);