Bacula-users

[Bacula-users] Unneeded database index

2013-08-08 04:03:22
Subject: [Bacula-users] Unneeded database index
From: "azurIt" <azurit AT pobox DOT sk>
To: <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 08 Aug 2013 09:44:46 +0200
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

------------------------------------------------------------------------------
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

<Prev in Thread] Current Thread [Next in Thread>