[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [openldap 2.1.12] add a new index in database
> > Hi,
> >
> > I need to add a new index in my already existing database.
> >
> > I found about it 2 ways:
> > 1. add the new index in the slapd.conf and use "slapindex" command without running slapd
> > => "cold" command
> > => calculate all indexes for all entries
> > => it takes several days if database with 30000 entries
>
> with 25,000 entries in the database
> marin:/opt/avci/sbin # time ./slapindex -b "o=avci"
>
> real 8m21.698s
> user 3m19.500s
> sys 2m8.590s
If I well understood, I have to resize my Berkely database to reach this great time ?
using DB_CONFIG file that I have to create in my backend-bdb directory
But Do I have to declare this file in the slapd.conf too or elsewhere ??
> > 2. add the new index in the slapd.conf and make a restore using the "slapadd" command
> > without running slapd
> > => "cold" command
> > => doesn't calculate all indexes for all entries ??? but creates the newindex.bdb file in
> > the backend directory ?
> > => it takes 2 hours if database with 30000 entries
>
> No, it took only a few minutes (say 5 min) to add the 25,000 entries
ok but is it correct to use slapadd comand to add a new index to an already existing database ?
is it equivalent to slapindex command ?
> > Please, can you give me more information about new index adding ?
> > To add a new index (for example maillogin) in slapd.conf, is it like that ?
> [...]
> > # Indices to maintain
> > index userid,pnnumber,submxid,maillogin eq,pres
> > index objectClass eq
>
> yes.
ok
Thanks ;-P
Helene