> > > I had the same problems with Jobs which have more than 680000 files and > > > mysql as database. After putting an index on JobId in the File table I > > > got an enormous speed up: > > > > I just tried this and the speedup is amazing. Getting to selection of > > individual old files for a user now takes less than 5 minutes, vs more > > than an hour previously. > > This is surprising because I always understood that a multiple index > (JobId, PathId, FilenameId) was equivalent (actually better) than one only > on JobId. > > Could you tell me what DB you are using MySQL, ...?
mysql Ver 12.22 Distrib 4.0.24, for pc-linux-gnu (i386) as released in debian sarge > and confirm what > indexes you had before and after your change? previously there was an index called FilenameId which included the columns FilenameId and PathId only. I just added the index JobId including only JobId because when bacula is building the filelist the where statemant looks for matching JobId's most of the time. > If simply adding a single index on JobId to the File table makes such an > amazing difference in speed, I definitely want to ensure that 1.38 is > released that way. -- Mit freundlichen Gruessen / with kind regards Daniel Weuthen ------------------------------------------------------------------- Megabit Informationstechnik GmbH Karstr.25 41068 Moenchengladbach Tel: 02161/308980 mailto:[EMAIL PROTECTED] ftp://megabit.net Fax: 02161/3089818 mailto:[EMAIL PROTECTED] http://megabit.net -------------------------------------------------------------------
pgpQiOFRWSuWu.pgp
Description: PGP signature