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

RE: server side sorting & paging?

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Jon Poulton

> The crux of the problem is: If I have 1000 results for "A" and I want
> to display these in alphabetical order 1 page at a time-
> currently I have
> to sort ALL the results IN MEMORY before retreiving only ONE
> PAGE from the 1000
> things I just sorted. OK?

Even a 20 MHz '286 can sort 1000 entries in less than 100 milliseconds. It is
trivial for a single client to sort 1000 entries on the fly. For a single
server to sort millions of entries for hundreds of clients at once, however,
is another thing entirely.

> >>I believe LDAP is intended to be a large-scale distributed
> information
> >>storage/retrieval mechanism.

> And as such I would expect it to return results from a query
> in some sort
> of clearly defined order. It doesnt.

I'm not sure where this expectation comes from, but nowhere in any edition of
the X.500 protocol spec or any version of the LDAP spec is anything like this
promised. In fact, certain portions of the spec explicitly state that clients
must not assume anything about the ordering of returned results.

>   -- Howard Chu
>   Chief Architect, Symas Corp.       Director, Highland Sun
>   http://www.symas.com               http://highlandsun.com/hyc
>   Symas: Premier OpenSource Development and Support