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

(ITS#7777) Filtering on modifyTimestamp is slower with index



Full_Name: Raphael Ouazana
Version: 2.4.38
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (88.173.78.196)


Hi,

I have a case where using modifyTimestamp index is far slower than with no
index.

First with indexing:

###Caching

$ time ldapsearch -b <people> -D <manager> -W
# search result
search: 2
result: 0 Success

# numResponses: 293886
# numEntries: 293885

real	0m12.153s
user	0m7.805s
sys	0m1.888s

### Request

$ time ldapsearch -b <people> -D <manager> -W
'(&(modifyTimestamp>=20131023163804Z)(modifyTimestamp<=20131123163804Z))'

# search result
search: 2
result: 0 Success

# numResponses: 24277
# numEntries: 24276

real	0m23.441s
user	0m0.554s
sys	0m0.073s


Now without modifyTimestamp index:

###Caching

$ time ldapsearch -b <people> -D <manager> -W
# search result
search: 2
result: 0 Success

# numResponses: 293886
# numEntries: 293885

real	0m11.627s
user	0m7.354s
sys	0m1.772s

### Request

$ time ldapsearch -b <people> -D <manager> -W
'(&(modifyTimestamp>=20131023163804Z)(modifyTimestamp<=20131123163804Z))'
# search result
search: 2
result: 0 Success

# numResponses: 24277
# numEntries: 24276

real	0m0.701s
user	0m0.569s
sys	0m0.070s

As you can see, without indexing the request takes less than 1s, while with
index it takes more than 20s. I think it is not the expected result.

Regards,
Raphaël Ouazana.