Bacula-users

Re: [Bacula-users] "Version Browser" too slow

2008-04-17 19:00:24
Subject: Re: [Bacula-users] "Version Browser" too slow
From: Dirk Bartley <bartleyd2 AT chartermi DOT net>
To: tecnicos AT aomail.uab DOT es
Date: Thu, 17 Apr 2008 19:00:02 -0400

Helllooooo

Yes, there is.  There is an index that can be added to the database that
will make it faster.  Read the online help snippet below.

Also, set the record limit to something low to start with like 5 or 10
jobs.  That almost always makes it go quite quick.  The issue even crops
up for me sometimes with the index on.  The database does not make what
I would think to be the quickest strategy for finding the records that
match the select.  It ends up searching every record instead of using
the index.

Dirk

<snip>

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.
 
</snip>


On Tue, 2008-04-15 at 10:44 +0200, Daniel Ruiz Molina wrote:
> Hi,
> 
> When I run "Version Browser" from "bat", Bacula takes a lot of time for
> give me the file list. Is there any way for making it faster?
> 
> Thanks.
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>