On Di, 25 Okt 2005, Kern Sibbald <[EMAIL PROTECTED]> wrote:
> >
> > Mine show this:
> >
> > mysql> show index from File;
> >
> > | File  |          0 | PRIMARY    |            1 | FileId      | A
> > |    22336637 |     NULL | NULL   |      | BTREE      |         |
> > | File  |          1 | FilenameId |            1 | FilenameId  | A
> > |     7445545 |     NULL | NULL   |      | BTREE      |         |
> > | File  |          1 | FilenameId |            2 | PathId      | A
> > |    22336637 |     NULL | NULL   |      | BTREE      |         |
> >
> > It's only three indexes!! Probably that's the reason! There's indexes
> > missing! I'll look in the bacula source an create all the missing
> > indexes! I expect this to fix the problem!
> 
> Well, something is wrong here, you should have an index on JobId as follows:
> 
> | File  |          0 | PRIMARY    |            1 | FileId      | A         |  
>    1309549 |     NULL | NULL   |      | BTREE      |         |
> | File  |          1 | FilenameId |             1 | FilenameId  | A         | 
>      218258 |     NULL | NULL   |      | BTREE      |         |
> | File  |          1 | FilenameId |             2 | PathId      | A         | 
>      654774 |     NULL | NULL   |      | BTREE      |         |
> | File  |          1 | JobId      |                1 | JobId       | A        
>  |  119 |     NULL | NULL   |      | BTREE      |         |

Yes, and that's the solution! The missing index on JobId make the SQL
with "... where JobID=...." painfully slow!
I checked the source and the debian package and this index is included
by default. I have no idea why it's missing on my database. I'm creating
it right now (takes some time)!

Reagrds
Volker

-- 
  Volker Sauer  *  Alexanderstrasse 39/217  *  64283 Darmstadt
  Telefon: 06151-154260  *  Mobil: 0179-6901475 * ICQ#98164307
  mailto:[EMAIL PROTECTED]  *  http://www.volker-sauer.de
  PGPKey-Fingerprint: DB2611C7B12E0B2739992E4F7E354E4D5DD5D0E0

Attachment: signature.asc
Description: Digital signature

Reply via email to