Hello. In the begining when I lear to use LDAP I was told ldap have powerful
search but no sorting facility. Later I leared ldap_search(1) command on
openldap which DO have sorting option, and ldap_sort() in php4+ also sort
the result.

If the search is acutally done on client side, it can be very
traffic-consuming becaues I may wish to search for 1,000 items and only wish
to get the first page of results (No. 1 to No. 20), and I still retrieved
1,000 records.

I suspect (guess) the sorting is actually done in a very simple way by the
LDAP client:
1) the client (ldap_search or php) connect to the LDAP server and search
with filter, ask the server to return only the search key attribute.
2) 1,000 search keys are returned from server (along with dn);
3) the client sort the keys, and determin which are the first 20 items;
4) and query LDAP server again ask for the 20 items.

This reduced traffic by only asking to return full attributes for the
entries to be read, other entries only return the search key attribute.

I am just curious if my guess is correct. :)

--
Zhang Weiwu   Real Softservice
International business: http://www.realss.com
International sales:    0086 10 84606011
Inland business:        http://www.realss.cn
Inland sales call:      0086 592 2099987
                Sent from Pine: http://www.washington.edu/pine/

---
You are currently subscribed to [email protected] as: [EMAIL PROTECTED]
To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the 
SUBJECT of the message.

Reply via email to