Hey Nischal,
   You could insert some records with known key names in various
orders and a common value for a property to query on.  If the results
come back out key-ordered, that would be a good indication that the
method might work.  Also, I *think* there are some videos, groups
posts, and references in the docs (user or code) mentioning entities
in key order.



Robert




On Sat, Apr 23, 2011 at 23:59, Nischal Shetty <nischalshett...@gmail.com> wrote:
> @Robert Thank you so much! Any idea how I can confirm on the timestamp + key
> thingy? I always need it based on timestamp (descending). If that works then
> it would help me a lot!
> I have looked into exploding indexes. My query would always be equality
> checks over list properties exclusively. I'm hoping that would not be a
> problem?
> Example:
> select from post
> where listproperty := label1 && listproperty := label2
> sortby time desc
> This is what we currently have. If the timestamp thingy is true then we
> would be able to remove the last line and that would be so damn cool :)
> On 24 April 2011 08:24, Robert Kluin <robert.kl...@gmail.com> wrote:
>>
>> You probably need to be aware of exploding indexes if you're indexing
>> a list property.  It is just something you should consider and be
>> aware of.
>>
>>  http://code.google.com/appengine/docs/python/datastore/queries.html#Big_Entities_and_Exploding_Indexes
>>
>> If you're always planning to sort by timestamp, you could consider
>> prepending the timestamp on the Post entity keys.  Your entities
>> should then be returned to the app sorted by timestamp without
>> explicitly specifying the sort order.  At least that is the case if I
>> recall correctly.
>>
>>
>> Robert
>>
>>
>>
>>
>> On Sat, Apr 23, 2011 at 13:14, nischalshetty <nischalshett...@gmail.com>
>> wrote:
>> > We're building a new web product.
>> > 1. We have the concept of label in them.
>> > 2. Each post gets one or more label.
>> > 3. The posts have to be displayed sorted according to timestamp in
>> > descending order
>> > We're making use of List<String> (ListProperty) to save these labels for
>> > each post. It's working well for us. We can now query over multiple
>> > labels
>> > and retrieve posts.
>> > However, we need the posts to be sorted on timestamp in descending
>> > order.
>> > Due to this our query would have the timestamp as the sort order along
>> > with
>> > the label names. Due to this, we need indexes. And the indexes are being
>> > built for combination of the labels and timestamp.
>> > So, if our query has 2 labels and the sort order then the index would be
>> > built for these. If we query for 3 labels and sort order we would have a
>> > new
>> > index and so on.
>> > I wanted to know if there is any other way such that we can avoid the
>> > indexes? Are indexes cool if you anticipate a LOT of data everyday? Is
>> > there
>> > a way to have the posts sorted based on timestamp in a different way?
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Google App Engine" group.
>> > To post to this group, send email to google-appengine@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-appengine+unsubscr...@googlegroups.com.
>> > 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 google-appengine@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com.
>> 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 google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> 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 google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to