From: Dan L. <da...@la...> - 2006-01-28 22:50:00
|
On 28 Jan 2006 at 12:54, Drew Tomlinson wrote: > On 1/28/2006 7:48 AM 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. > > > > > This made an amazing difference for me as well. I know basically > nothing about MySQL but read the docs and added the indexes you > mention. Is there any downside to doing this other than the additional > overhead when inserting records? Time will tell. > And if there's minimal downside, is > there any reason why Bacula doesn't come with these indexes by default? Because they weren't needed. I'm of the view that indexes should only be added after seeing a tangible benefit. Such as now. That said, perhaps they existed and were removed in search of better performance in other areas. FileSet { Name = "pepper files" Include { Options { signature=MD5 } File = "c:/Documents and Settings" } Exclude { # File = "/Documents and Settings/*/Local Settings/Temporary Internet Files/*" File = "c:/Documents and Settings/*/Local Settings/Temporary Internet Files/*" # File = "/Documents and Settings/*/Local Settings/Temp" # File = "/Documents and Settings/*/Local Settings/Temp/" File = "c:/Documents and Settings/*/Local Settings/Temp" File = "c:/Documents and Settings/*/Cookies/*" } } Job { Name = "pepper" JobDefs = "DefaultJob" Client = pepper-fd FileSet = "pepper files" Write Bootstrap = "/home/bacula/working/pepper-fd.bsr" Schedule = WeeklyCycleDaytime; Reschedule On Error = yes Reschedule Interval = 10 minutes } SUGGESTION: Someone please add this as an FAQ to the wiki: Why do these indexes exist? http://paramount.ind.wpi.edu/wiki Thanks -- Dan Langille : http://www.langille.org/ BSDCan - The Technical BSD Conference - http://www.bsdcan.org/ |