I have the following indexes defined in my postgersql db.
bacula=> \di+ (file_|job_)*
Schema | Name | Type | Owner | Description | Table
--------+-------------------------------+-------+--------+-------------+----------
public | file_fp_idx | index | bacula | | file
public | file_jobid_idx | index | bacula | | file
public | file_pkey | index | bacula | | file
public | job_media_job_id_media_id_idx | index | bacula | |
jobmedia
public | job_name_idx | index | bacula | | job
public | job_pkey | index | bacula | | job
(6 rows)
bacula=>
Still dbcheck is pretty fast.
And this are the relevant lines from make_postgresql_tables
CREATE INDEX file_jobid_idx on file (jobid);
CREATE INDEX file_fp_idx on file (filenameid, pathid);
--
-- Possibly add one or more of the following indexes
-- if your Verifies are too slow.
--
-- CREATE INDEX file_pathid_idx on file(pathid);
-- CREATE INDEX file_filenameid_idx on file(filenameid);
-- CREATE INDEX file_jpfid_idx on file (jobid, pathid, filenameid);
CREATE INDEX job_name_idx on job (name);
Attila
Jeffrey L. Taylor wrote:
I added 4 indexes: File.PathId, File.FilenameId, Job.FileSetId, and
Job.ClientId. dbcheck now takes 1 minute. Without the indexes, I
killed the orphaned path check after 2 days.
HTH,
Jeffrey
Quoting Deann Corum <[EMAIL PROTECTED]>:
Thanks Jeffrey and Attiila. I'll look at the dbcheck script and see what
I can figure out. And the mysqladmin processlist command is very
helpful. It's also good to know others out there have large Bacula
databases. I still wonder what the largest known one is!
It seems we're ok even though we stopped the dbcheck process. From my
background, I'm accustomed to having to do something to maintain your
databases, so it seems like some sort of maintenance *should* be done
from time to time even if only once or twice a year. We'll have to
figure out the best way to do that, or take the other approach and 'if
it ain't broke, don't fix it'. ;)
Thanks,
Deann
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users