[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [openldap 2.1.12] add a new index in database



Hi,

Helene.Lastennet@alcatel.fr writes:

> 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

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

-Dieter

-- 
Dieter Kluenter  | Systemberatung
Tel:040.64861967 | Fax: 040.64891521
mailto: dkluenter(at)dkluenter.de
http://www.avci.de