GQL, Aggregation and Order By

Posted by Koran on Stack Overflow See other posts from Stack Overflow or by Koran
Published on 2010-06-13T12:06:15Z Indexed on 2010/06/13 12:12 UTC
Read the original article Hit count: 271

Filed under:
|

Hi,

How can GQL support ORDER BY when it does not support aggregation?

The question is - if say the result of the query is more than 1000, does ORDER BY return fully ordered list or only the first 1000 items which is then ordered?

To explain the question more: is conceptually MIN() same as query.orderby('asc').fetch(1)?

If it is properly ordering the list, then how can it not provide COUNT(), since to properly order the list, GQL possibly has to parse through the whole list - in which case, COUNT() is not an issue at all?

Or is item indexed and kept in some type of tree so that it does not need to parse it all the time?

© Stack Overflow or respective owner

Related posts about aggregate-functions

Related posts about gql