all the indexes in the default configuration. In addition, you may
find that because of your own usage patterns, you need additional indexes.
-The most important indexes for performance are the three indexes on the
+The most important indexes for performance are the two indexes on the
{\bf File} table. The first index is on {\bf FileId} and is automatically
made because it is the unique key used to access the table. The other
-two are the JobId index and the (Filename, PathId) index. If these Indexes
+one is the (JobId, PathId, Filename) index. If these Indexes
are not present, your performance may suffer a lot.
\subsection{PostgreSQL Indexes}
\begin{verbatim}
psql bacula
CREATE INDEX file_jobid_idx on file (jobid);
-CREATE INDEX file_fp_idx on file (filenameid, pathid);
+CREATE INDEX file_fp_idx on file (jobid, pathid, filenameid);
\end{verbatim}
\normalsize
\begin{verbatim}
sqlite <path>/bacula.db
CREATE INDEX file_jobid_idx on File (JobId);
-CREATE INDEX file_jfp_idx on File (JobId, FilenameId, PathId);
+CREATE INDEX file_jfp_idx on File (JobId, PathId, FilenameId);
\end{verbatim}
\normalsize