My Oracle Support Banner

OUD11g Use Of Non-Existent Attribute In Search Filter Slows Down Query (Doc ID 2156647.1)

Last updated on FEBRUARY 16, 2019

Applies to:

Oracle Unified Directory - Version 11.1.1.5.0 and later
Information in this document applies to any platform.

Symptoms

It has been observed that including a non-existent attribute within a search filter can lead to an unindexed search condition and consequently result in a longer search response.  For example, the following simple search returns in milliseconds...

$ ./ldapsearch -p 38959 -b "dc=example,dc=com" -D "cn=dirmgr" -w <PASSWORD> uid=user10001
dn: uid=user10001,ou=people,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
uid: user10001
cn: user10001
sn: last10001
$

 

This is confirmed by the corresponding access log entries...

[30/Jun/2016:03:12:38 -0700] BIND REQ conn=5 op=0 msgID=1 type=SIMPLE dn="cn=dirmgr" version=3
[30/Jun/2016:03:12:38 -0700] BIND RES conn=5 op=0 msgID=1 result=0 authDN="cn=Directory Manager,cn=Root DNs,cn=config" etime=0
[30/Jun/2016:03:12:39 -0700] SEARCH REQ conn=5 op=1 msgID=2 base="dc=example,dc=com" scope=sub filter="(uid=user10001)" attrs="ALL"
[30/Jun/2016:03:12:39 -0700] SEARCH RES conn=5 op=1 msgID=2 result=0 nentries=1 etime=0

Adding a non-existent attribute to the search filter will lead to an unindexed search condition and significantly slow down the search response.  In the example below, the attribute named blahblahblah has been added to the search filter...

$ ./ldapsearch -p 38959 -b "dc=example,dc=com" -D "cn=dirmgr" -w <PASSWORD> "(|(uid=user10001)(blahblahblah=foo))"
dn: uid=user10001,ou=people,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
uid: user10001
cn: user10001
sn: last10001
$

 

Inspection of the corresponding access log entries reveals that the search takes over 7 seconds to complete and is an unindexed search...

[30/Jun/2016:03:12:59 -0700] BIND REQ conn=6 op=0 msgID=1 type=SIMPLE dn="cn=dirmgr" version=3
[30/Jun/2016:03:12:59 -0700] BIND RES conn=6 op=0 msgID=1 result=0 authDN="cn=Directory Manager,cn=Root DNs,cn=config" etime=0
[30/Jun/2016:03:12:59 -0700] SEARCH REQ conn=6 op=1 msgID=2 base="dc=example,dc=com" scope=sub filter="(|(uid=user10001)(blahblahblah=foo))" attrs="ALL"
[30/Jun/2016:03:13:07 -0700] SEARCH RES conn=6 op=1 msgID=2 result=0 nentries=1 additionalInfo="Unindexed" etime=7745

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.