From f27e76b6030a74be8dca96105fd15b0aab2cc160 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 20 Apr 2010 13:41:18 +0200 Subject: [PATCH] Add performance notes in make_xxx_tables.in files --- bacula/src/cats/make_mysql_tables.in | 17 +++++- bacula/src/cats/make_postgresql_tables.in | 73 ++++++++++++++--------- 2 files changed, 60 insertions(+), 30 deletions(-) diff --git a/bacula/src/cats/make_mysql_tables.in b/bacula/src/cats/make_mysql_tables.in index da6d06d347..1d3f8790a7 100644 --- a/bacula/src/cats/make_mysql_tables.in +++ b/bacula/src/cats/make_mysql_tables.in @@ -2,6 +2,10 @@ # # shell script to create Bacula MySQL tables # +# Important note: +# You won't get any support for performance issue if you changed the default +# schema. + bindir=@SQL_BINDIR@ PATH="$bindir:$PATH" db_name=${db_name:-@db_name@} @@ -28,6 +32,17 @@ CREATE TABLE Path ( INDEX (Path(255)) ); +-- We strongly recommend to avoid the temptation to add new indexes. +-- In general, these will cause very significant performance +-- problems in other areas. A better approch is to carefully check +-- that all your memory configuation parameters are +-- suitable for the size of your installation. If you backup +-- millions of files, you need to adapt the database memory +-- configuration parameters concerning sorting, joining and global +-- memory. By default, sort and join parameters are very small +-- (sometimes 8Kb), and having sufficient memory specified by those +-- parameters is extremely important to run fast. + -- In File table -- FileIndex can be 0 for FT_DELETED files -- FileNameId can link to Filename.Name='' for directories @@ -64,7 +79,7 @@ CREATE TABLE RestoreObject ( # # Possibly add one or more of the following indexes # to the above File table if your Verifies are -# too slow. +# too slow, but they can slow down backups. # # INDEX (PathId), # INDEX (FilenameId), diff --git a/bacula/src/cats/make_postgresql_tables.in b/bacula/src/cats/make_postgresql_tables.in index bdf6efe3da..18335d9c68 100644 --- a/bacula/src/cats/make_postgresql_tables.in +++ b/bacula/src/cats/make_postgresql_tables.in @@ -2,51 +2,65 @@ # # shell script to create Bacula PostgreSQL tables # +# Important note: +# You won't get any support for performance issue if you changed the default +# schema. +# bindir=@SQL_BINDIR@ PATH="$bindir:$PATH" db_name=${db_name:-@db_name@} psql -f - -d ${db_name} $* <