From d7d72483ffa6abc37f593c8410b0b1491be43641 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Wed, 29 Aug 2007 00:51:27 +0000 Subject: [PATCH] Add to help info on creating indexes that will help the performance of the version browser. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5411 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/help/restore.html | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/bacula/src/qt-console/help/restore.html b/bacula/src/qt-console/help/restore.html index 447d0e15d1..400e807187 100644 --- a/bacula/src/qt-console/help/restore.html +++ b/bacula/src/qt-console/help/restore.html @@ -126,5 +126,34 @@ to the server by the other interfaces. Restore. These indicate to the user the time it may take to complete any tasks that could take a long time period. +

Version Browser Performance

+ +

If you have used the version browser with a large database, you may have +noticed that the performance can begin to be quite slow. A way to improve the +response time of the database server is to add indexes that will assist a +couple of the specific queries that are made. + +

For postgresql add 2 indexes with the following commands in psql: +
CREATE INDEX file_filenameid_jobid ON file USING btree (filenameid, +jobid); +
CREATE INDEX file_pathid_idx ON file USING btree (pathid); + +

For mysql add 2 indexes with the following commands in mysql: +
CREATE INDEX file_filenameid_jobid ON File (FilenameId, JobId); +
CREATE INDEX file_pathid_idx ON File (PathId); + +

There is one way to make the first of those two indexes perform just a +little better. It is to create a partial index. First, at least one backup +must be in the database that has at least one directory. Then in psql or mysql +perform the command: +
SELECT FilenameId FROM Filename WHERE name=''; +
Use the results of this command and replace for XXX in the following command: +
CREATE INDEX file_filenameid_jobid2 ON File (JobId) WHERE FilenameId=XXX; +
This index will use less disk space and will perform better. Don't forget to +remove the index it replaces, file_filenameid_jobid. + +

If you have sqlite and would be willing to test out the creation of these +indexes to see if they work, please let me know the commands. + -- 2.39.5