[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Search using indexed attributtes
Hi everybody,
we have some performance problems in searches based on indexed attributes.
CONFIGURATION
-----------------------------------
First of all I will explain our OpenLDAP configuration:
1. We have the next line in slapd.conf
index my_id,my_login eq
2. We have defined attributes as follows in local.schema
attributetype ( 1.3.6.1.4.1.8325.2.1.1 NAME 'my_id'
DESC 'Bla Bla Bla'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.8325.2.1.2 NAME 'my_login'
DESC 'Bla Bla Bla'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
SINGLE-VALUE )
objectclass ( 1.3.6.1.4.1.8325.2.2.1 NAME 'my_user'
DESC 'Bla Bla Bla'
MUST ( my_id $ my_login )
MAY ( my_password $ my_appList ) )
3. and when we create users we use the following ldiff syntax
dn: my_login=test5,o=testcorp,c=es,ou=users
objectClass: my_user
my_id: 5
my_login: test5
my_password: testpasswd
my_appList: App1, App2
4. our LDAP database has over 2.000.000 users
The problem rise up when we SEARCH using the my_id attribute, because it
takes too much time (in order of several minutes).
if we search using the DN (my_login=xxxxx,o=testcorp,c=es,ou=users) it works
fine (in order of milliseconds), but if we try to search using the baseDN
(o=testcorp,c=es,ou=users) and a filter (my_id=xxxx) it takes too long to
complete the search (it seems it goes throught all entries searching for
that attribute).
Search command using the filter (the one that takes too long)
./ldapsearch -h ldap1 -b "o=testcorp,c=es,ou=users" "my_id=500000"
Search command using the exact DN (the one that works fine)
./ldapsearch -h ldap1 -b
"my_login=user50000,o=wanadoo,c=es,ou=users"
Does anyone know if our configuration is wrong or if we have to use the
search command in another way?
Thanks for your help !!!
________________________________________________________
Wanadoo España
Sistemas y Servicios / Servicios de Valor Añadido
Vicente Martínez Martínez / vmartinez@es.wanadoo.com
________________________________________________________