[389-users] Server side sort not using index

jim at scusting.com jim at scusting.com
Tue Mar 23 12:20:52 UTC 2010


Hi,

I noticed in our directory server logs a number of queries which are not 
using indexes, and this appears to be down to sorting of the query being 
done the server side:

----- Server sorted-------------
conn=1433 op=1 SRCH base="o=blah.com" scope=2 
filter="(&(accountid=abc123)(objectClass=dnszone)(dnstype=soa))" attrs=ALL
conn=1433 op=1 SORT dnszonename (4)
conn=1433 op=1 RESULT err=0 tag=101 nentries=1 etime=0 notes=U

----- Not sorted ----------
conn=1440 op=1 SRCH base="o=blah.com" scope=2 
filter="(&(accountid=abc123)(objectClass=dnszone)(dnstype=soa))" attrs=ALL
conn=1440 op=1 RESULT err=0 tag=101 nentries=1 etime=0

The 'accountid' field is indexed but when doing server side sorting it 
seems to ignore this index - is this expected behaviour?  What options 
do I have to ensure the index is used - just get the developers to sort 
the results in their code rather than on the server?

Thanks.

Jim.





More information about the 389-users mailing list