Zitat von azurIt <azurit AT pobox DOT sk>:
> Hi,
>
> i'm having some MySQL performance difficulties so i started to
> search what can i do better. My table 'File' had these indexes
> created:
> CREATE INDEX file_jobid_idx on File (JobId);
> CREATE INDEX file_jpf_idx on File (JobId, PathId, FilenameId);
>
> Which looks correct according to documentation:
>http://www.bacula.org/en/dev-manual/main/main/Catalog_Maintenance.html
>
> BUT! The first index apperas to be unneeded as it's part of the
> second index. According to MySQL documentation, 'any leftmost prefix
> of the index can be used by the optimizer to find row':
>http://dev.mysql.com/doc/refman/5.5/en/multiple-column-indexes.html
>
> I suggest to remove it.
>
> azur
Would also apply to PostgreSQL i guess:
http://www.postgresql.org/docs/9.2/interactive/indexes-multicolumn.html
Any comment why the additional single column index could be useful?
Regards
Andreas
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users