[Developers] MQL index property

John Giannandrea jg at metaweb.com
Wed Apr 16 17:57:56 UTC 2008


David Flanagan wrote:
> If the ordering is not to be documented as part of the schema, are you
> suggesting, then, that users add "sort":"index" to their queries  on  
> the
> theory that they might be happier with the order things come out in,  
> on
> the off chance that indices were added when the data was imported?

Ordering is optional, and the schema doesnt tell you if it is in use.  
index order can be added to any clause, so anything might be ordered.  
Its just another kind of assertion, albeit an unusual one.

While you could add index:null, sort:index to every query, it only  
makes sense to do so when you know you care and at least some of the  
data is ordered.

In general most data is unordered and asking for things sorted is more  
expensive.  So it very much depends on the data set.

-jg



More information about the Developers mailing list