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

Research time is important






 Hi All,

 I am trying to do a search on my database that contains about 400 000 entries

 When i do a search like

 ldapsearch ... "(&(|(VoiceMailboxId=10)(VoiceMailboxId=11)(VoiceMailboxId=12))(VPUNumber=2)(vpuSiteName=clust50))"

 the result research take 4 minutes (timelimit) in one case :

 - if the vpuSiteName exist, VPUNumber don't exist and whatever the existence of the VoiceMailboxId

The log file :
.....
        EQUALITY
=> equality_candidates
=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/VPUNumber.dbb", 16, 600 )
<= ldbm_cache_open (cache 5)
=> key_read
<= idl_fetch 7265 ids (7265 max)
<= index_read 7265 candidates
<= equality_candidates 7265
<= filter_candidates 7265
=> filter_candidates
        EQUALITY
=> equality_candidates
=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/vpuSiteName.dbb", 16, 600 )
<= ldbm_cache_open (cache 6)
=> key_read
<= index_read 1016762 candidates
<= equality_candidates 1016762
<= filter_candidates 1016762
<= list_candidates 1016762
<= filter_candidates 1016762
<= list_candidates 1016762
<= filter_candidates 1016762
<= list_candidates 1016762
<= filter_candidates 1016762
entry_rdwr_runlock: ID: 1
====> cache_return_entry_r( 1 ): returned (0)
=> id2entry_r( 1 )
entry_rdwr_rtrylock: ID: 1
====> cache_find_entry_id( 1 ) "o=alcatel,c=fr" (found) (1 tries)
<= id2entry_r( 1 ) 0x105e88 (cache)
=> test_filter
    AND
=> test_filter_and
=> test_filter
    OR
=> test_filter_or
=> test_filter
    EQUALITY
=> access_allowed: search access to "o=alcatel,c=fr" "VoiceMailboxId" requested
<= root access granted
<= test_filter 5
=> test_filter
    EQUALITY
=> access_allowed: search access to "o=alcatel,c=fr" "VoiceMailboxId" requested
<= root access granted
<= test_filter 5
=> test_filter
    EQUALITY
=> access_allowed: search access to "o=alcatel,c=fr" "VoiceMailboxId" requested
<= root access granted
<= test_filter 5
<= test_filter_or 5
<= test_filter 5
<= test_filter_and 5
<= test_filter 5
candidate 1 does match filter
entry_rdwr_runlock: ID: 1
====> cache_return_entry_r( 1 ): returned (0)
=> id2entry_r( 2 )
entry_rdwr_rtrylock: ID: 2
====> cache_find_entry_id( 2 ) "ou=ansf,o=alcatel,c=fr" (found) (1 tries)
<= id2entry_r( 2 ) 0x105fc8 (cache)
=> test_filter
    AND
=> test_filter_and
=> test_filter
    OR
=> test_filter_or
=> test_filter
    EQUALITY
=> access_allowed: search access to "ou=ansf,o=alcatel,c=fr" "VoiceMailboxId"
...



 For the other case the result research take 1 sec


Log file:

        EQUALITY
=> equality_candidates
=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/vpuSiteName.dbb", 16, 600 )
<= ldbm_cache_open (cache 7)
=> key_read
<= index_read 1016762 candidates
<= equality_candidates 1016762
<= filter_candidates 1016762
<= list_candidates 6
<= filter_candidates 6
<= list_candidates 6
<= filter_candidates 6
<= list_candidates 6
<= filter_candidates 6
entry_rdwr_runlock: ID: 1
====> cache_return_entry_r( 1 ): returned (0)
=> id2entry_r( 114248 )
=> ldbm_cache_open( "/usr/local/var/openldap-ldbm/id2entry.dbb", 7, 600 )
<= ldbm_cache_open (cache 1)
<= id2entry_r( 114248 ) not found
search: candidate 114248 not found
=> id2entry_r( 114250 )
entry_rdwr_rtrylock: ID: 114250
====> cache_find_entry_id( 114250 ) "cn=2599001506,ou=ansf, o=alcatel, c=fr" (found) (1 tries)
<= id2entry_r( 114250 ) 0x1061e8 (cache)
=> test_filter
    AND
=> test_filter_and
=> test_filter
    OR
=> test_filter_or
=> test_filter
    EQUALITY
=> access_allowed: search access to "cn=2599001506,ou=ansf, o=alcatel, c=fr" "VoiceMailboxId" requested
...



 My configuration in slapd.conf :

 index cn,uid,telephoneNumber eq
 index telephoneNumber2,telephoneNumber1,telephoneNumber3,telephoneNumber4,adrIMAP4 eq
 index vpuSiteName,VoiceMailboxId,VPUNumber eq
 index objectClass eq

I have watch the log file and ,when the research take the timelimit, slapd compare one by one the entries to the filter


I use a BerkeleyDB database and openldap 2.0.4

Any information would be greatly appreciated.

Thanks in advance

Benoit