Sascha Bejer <sascha.bejer <at> access-company.com> writes:

> Hi,
>  
> When running bareos-dbcheck, i get this complain: “Note. Index over the
> FilenameId column not found, that can greatly slow down dbcheck.”
> And it is actually slow, the DB is quite big.
> After checking documentation, I could not find instructions how to index
> the table in mysql, besides some table creation scripts which should have
> run when bareos was set up.
> What is the correct way to reindex this?
>  

The create script has some hints:

--
-- Possibly add one or more of the following indexes
--  to the above File table if your Verifies are
--  too slow, but they can slow down backups.
--
--  INDEX (PathId),
--  INDEX (FilenameId),
--

If I look at the dbcheck code when it gives that warning it also
offers you the opportunity to create a temporary index.

Problem is most likely that MySQL cannot use the index that is
there which is on JobId, PathId, FilenameId. Or maybe it should
read older mysql versions as things have changed quite drastic over
the last years.

I think postgresql is fine with using one of the elements of a index
which is build on multiple items.

So you could add a temporary index but I would stay away from adding
extra indexes as some have quite some impact on other operations.

It also seems that newer MySql/MariaDB etc have much better optimizers.

-- 
Marco van Wieringen                   [email protected]
Bareos GmbH & Co. KG                  Phone: +49-221-63069389
http://www.bareos.com                     

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens,
                 P. Storz, M. v. Wieringen



-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to