locked
PartitionKey, RowKey ordering RRS feed

  • Question

  • I'm trying to decide on a new data schema at present. And I'm trying to remember....

    If I make a query across multiple partitionKeys, then in what order is query data returned - is everything returned sorted (partitionkey, rowkey) or is a merge done so that everything is returned ordered by (rowkey) across all relevant partitions?

    e.g. if I were writing a blogging platform and I gave each blogger their own partition, and used the smarx-inverse-ticks for rowkey, then would I be able to get back a time ordered list of most recent blogs across all partitions?

    Thanks

    Stuart (who really should just write the test for this!)

    • Moved by DanielOdievichEditor Tuesday, September 28, 2010 10:34 PM forum migration (From:Windows Azure)
    Friday, September 17, 2010 3:54 PM

Answers

  • The following is documented:

    Query results are sorted by PartitionKey, then by RowKey. Ordering results in any other way is not currently supported.

    This suggests you will get time-ordered lists for each user.

    Friday, September 17, 2010 4:24 PM
    Answerer

All replies

  • The following is documented:

    Query results are sorted by PartitionKey, then by RowKey. Ordering results in any other way is not currently supported.

    This suggests you will get time-ordered lists for each user.

    Friday, September 17, 2010 4:24 PM
    Answerer
  • Thanks

    Yeah - I kind of remembered some of the details after I'd sent it - I think the query gets sent to one partition master at a time - and each one then either returns results or a continuation.

    I'd forgotten how tricky it was to stop thinking relationally! I'll go look at things from a different angle.

    Before I architect too much, I wonder if there is any news anywhere on when secondary indicies might arrive? I wonder if I have to wait for PDC...

    Thanks again

    Stuart

    Friday, September 17, 2010 4:34 PM
  • Before I architect too much, I wonder if there is any news anywhere on when secondary indicies might arrive? I wonder if I have to wait for PDC...

    No. In my experience Microsoft has been reluctant to preannounce any Azure functionality and especially any date by which it would become available.

    Friday, September 17, 2010 5:44 PM
    Answerer