[Date Prev][Date Next]
RE: my searchs doesn't use indexes
You've probably already done this, but may as well check the obvious. =)
Did you add the "tac" index after you put the data in on that machine? If
so, did you regenerate the index file afterwards?
Regenerating the index file might be a good thing to try regardless (stop
ldap, slapdindex, start ldap).
Do your two databases have the same data? How do the sizes of the gdbm
> I have OpenLdap 2.0.23 installed using GDBM 1.8.0 in a
> Solaris 8 machine (sparc).
> I have installed 6000000 entries under ou=subscriber, with
> attributes "msisdn" and
> "tac"; and 4647 entries under ou=devices, with lots of
> attributes one of which is
> "tac". Basically, I have a msisdn, make a search in
> ou=subscriber to obtain the
> tac, and make a search in ou=devices with tac=.... as a filter.
> the indexes are: msisdn,tac pres,eq
> The problem is, the first search in subscriber is immediate,
> but the second search
> under devices is worth about a minute the first time.
> I have made a test with debug at 805, starting slapd, and run
> the command:
> ldapsearch -b "ou=devices" tac=35067323
> and in the log I can see it opens tac.gdbm and obtain 4648
> candidates, so it
> doesn't use the index to obtain only one candidate, and
> begins searching one by
> one. The next search under this branch is almost immediate
> because all the entries
> are in cache.
> Anyone have a suggestion? I cannot use it in a production
> environment with this
> problem. Could it be a bug in GDBM? I have a test machine
> with the same
> configuration, and it works correctly.
> Thanks in advance,
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada