top | item 6022536

(no title)

bonzoesc | 12 years ago

Secondary Indexing Improvements: Query results are now sorted and paginated, offering developers much richer semantics

So the results can be sorted but are not stored in sorted order in the secondary indices?

Secondary indexes are stored sorted on disk, but segmented per vnode. Previously, they wouldn't be sorted before being returned to a client.

Suppose you're querying for "Bananas" through "Bavaria"; the node that contains "Bassoon" could return its first result before the node containing "Bananas" and "Barons", which would, in old Riak versions, result in out-of-order results.

Disclosure: I work at Basho, and have been working on riak-ruby-client updates to support the 2i improvements.

discuss

order

cinbun8|12 years ago

Sorting used to be done through M/R queries. Does Riak perform a M/R sort on the results from each node from this release ? Just wondering how this sort is achieved and what it means for performance, if it is requested.