If you need the queries to run 'interactively,' you might want to implement 'custom indexes' to keep track of all heights for width 5. I do this in some apps, it makes 'queries' super fast at the expense of increased write cost. In this case you could create a model who's key_name will be the width value that has a property to store the heights. (The list of heights need not be indexed.)
Robert On Sat, Aug 13, 2011 at 16:29, Tom Fishman <[email protected]> wrote: > Say there are the following entities: > {ID:1, width: 5, height: 11, ... }, > {ID:2, width: 5, height: 12, ... }, > {ID:3, width: 5, height: 12, ... }, > {ID:4, width: 6, height: 13, ... }, > {ID:5, width: 5, height: 12, ... }, > {ID:6, width: 5, height: 13, ... }, > {ID:7, width: 5, height: 12, ... }, > ... > What's the most efficient way to return the set of heights ( the same values > are merged ) for all width==5? ( the answer should be 11, 12, 13 ). > We can build a query to enumerate all entities where width==5 and then build > the set in code (java/python). But this is not salable, we might have > thousands of entities share the same value. > I wish we can query the indexes... > Thanks! > - Tom > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine/-/RJShf4x-MgcJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
