Re: Sorting

Hi Dan,

Dan Connolly writes:
 > 
 > On Mar 8, 2005, at 3:49 PM, Danny Ayers wrote:
 > > On Tue, 8 Mar 2005 15:08:16 -0600, Dan Connolly <connolly@w3.org> 
 > >
 > > I don't understand why sorting should compete with streaming - isn't
 > > the transport at a different layer than order?
 > 
 > Er... no. The bytes coming over the wire (in the variable binding 
 > results)
 > are ordered. In order to sort the results, you can't send one along as 
 > soon as
 > you establish that it matches the query; you have to wait until
 > you have all the results, since the last one you find might be
 > the first one by the sort order.
 > 

Not really - a store can often achieve ordering on-the-fly by using
indexes, so it matches the results in the appropriate order.

Also note that since un-typed literals can be sorted in multiple ways
(numeric, alphabetic) you'd probably want to consider putting this
into the orderby syntax. 

Cheers,

Phil

Received on Wednesday, 9 March 2005 12:37:08 UTC