Bacula-users

Re: [Bacula-users] Bacula 2.2.8, dbcheck never completes

2008-08-19 04:35:54
Subject: Re: [Bacula-users] Bacula 2.2.8, dbcheck never completes
From: Technik <technik AT zli DOT ch>
To: Yuri Timofeev <tim4dev AT gmail DOT com>
Date: Tue, 19 Aug 2008 10:35:42 +0200 (CEST)
>bacula 2.2.8
>
>Now sql queries that will never finished :
>
>8) Check for orphaned File records
>EXPLAIN SELECT File.FileId, Job.JobId FROM File LEFT OUTER JOIN Job ON
>(File.JobId = Job.JobId)
>WHERE Job.JobId IS NULL LIMIT 300000

Ah, okay. Create this index and try again:

create index idxFJ on File (FileId,JobId);

>9) Check for orphaned Path records
>SELECT DISTINCT Path.PathId,File.PathId FROM Path LEFT OUTER JOIN File
>ON (Path.PathId=File.PathId) WHERE File.PathId IS NULL LIMIT 300000

This one should work if you have created this index:

create index PathId on File (PathId);

Hope this helps.


Cheers, Primus.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users