On Friday 16 September 2005 17:30, Alan Brown wrote: > On Fri, 16 Sep 2005, Kern Sibbald wrote: > > Gee, it looks like I really need to document checking/adding/deleting > > indexes to the manual so that users can easily check and correct any > > problems. This would probably be a nice mini-project for a script > > jockey. > > Probably. What are the recommended indexes for 1.36.3 ?
For the File table in MySQL it was: PRIMARY KEY(FileId), INDEX (JobId, PathId, FilenameId) For PostgreSQL it was: primary key (fileid) create index file_jobid_idx on file (jobid); create index file_fp_idx on file (filenameid, pathid); The difference was because MySQL was claimed to make good use of a multiple key index while PostgreSQL required the jobid index to work efficiently. However, given some of the recent discussions, I'm not 100% what is the best. I suspect that forgetting about the FileId key, something like: index JobId index JobId, FilenameId, PathId would work the best for both databases (SQLite too). -- Best regards, Kern ("> /\ V_V ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users