you should be fine then... just add sort according to date descending,
and set limit to 100. that way the datastore does everything for you.
one call, pretty good i think.

On May 1, 9:08 am, Pk <prakash...@gmail.com> wrote:
> it is the first 100 records order by date descending.
>
> On Apr 30, 10:28 am, Tristan <tristan.slomin...@gmail.com> wrote:
>
>
>
>
>
> > what does it mean "I'll get only the top 100 at any given time." ? How
> > do you determine "top" ?
>
> > On Apr 27, 9:19 pm, Pk <prakash...@gmail.com> wrote:
>
> > > Btw, I am not going to get all the isprocessed=true records at once.
> > > I'll get only the top 100 at any given time.
>
> > > On Apr 28, 7:05 am, Pk <prakash...@gmail.com> wrote:
>
> > > > Thank you so much Tristan. I have another question on top of #3.
> > > > I can query on listitem parentkey = listcontainerkey and isproccess =
> > > > true. it is easier, yes. but I expect the data to be growing. there;ll
> > > > be lot of users with all their listitems stored in a single big list,
> > > > the processed and unprocessed items. Most of the times, I'll query on
> > > > the parentkey = listcontainerkey and isprocessed = true. Do you think
> > > > it's still efficient in terms of performance?
>
> > > > On Apr 28, 12:51 am, Tristan <tristan.slomin...@gmail.com> wrote:
>
> > > > > 1) yes, that should work just fine (at least in low-level datastore
> > > > > API it does)
> > > > > 2) your key should not be your security / accessibility mechanism, so
> > > > > yes, it should be fine (although using a Long id vs. keyAsString would
> > > > > be prettier). also, you want to make sure you restrict access to your
> > > > > entities by who can see the entity
> > > > > 3) since we're using approach in #1, just add that to your query,
> > > > > where listItem parentKey = listcontainerkey and isProcess=true or
> > > > > whatnot. much easier.
>
> > > > > On Apr 26, 9:47 pm, Pk <prakash...@gmail.com> wrote:
>
> > > > > > Hi, I have a parent ListContainer entity with key and name 
> > > > > > properties.
> > > > > > and I have a child ListItem entity with key, name and parentkey
> > > > > > properties. The parentkey simply refers to the key in 
> > > > > > ListContainer. I
> > > > > > am building a site where I list the names in listcontainer, and when
> > > > > > the user chooses a name, it'll display the top 100 list items. I 
> > > > > > have
> > > > > > three questions
> > > > > > 1) I am wondering if it would be efficient in terms of performance 
> > > > > > if
> > > > > > I use the "key on child" approach. i.e., query the listitem where
> > > > > > parentkey = listcontainerkey.
> > > > > > 2) While displaying the names of listcontainer, is it safe to pass 
> > > > > > the
> > > > > > keys to the client browser and get it back?
> > > > > > 3) The ListItem has an additional property "IsProcessed". Now, I 
> > > > > > want
> > > > > > to display only the items which are not processed. Over a period if
> > > > > > time, I am expecting lot of listitems per listcontainer. Do you 
> > > > > > think
> > > > > > it would be wise to have the processed items in separate list and
> > > > > > delete it from the original?
>
> > > > > > I would very much appreciate your help as I've been struggling with
> > > > > > this requirement for long time.
>
> > > > > > --
> > > > > > You received this message because you are subscribed to the Google 
> > > > > > Groups "Google App Engine for Java" group.
> > > > > > To post to this group, send email to 
> > > > > > google-appengine-j...@googlegroups.com.
> > > > > > To unsubscribe from this group, send email to 
> > > > > > google-appengine-java+unsubscr...@googlegroups.com.
> > > > > > For more options, visit this group 
> > > > > > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google 
> > > > > Groups "Google App Engine for Java" group.
> > > > > To post to this group, send email to 
> > > > > google-appengine-j...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to 
> > > > > google-appengine-java+unsubscr...@googlegroups.com.
> > > > > For more options, visit this group 
> > > > > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "Google App Engine for Java" group.
> > > > To post to this group, send email to 
> > > > google-appengine-j...@googlegroups.com.
> > > > To unsubscribe from this group, send email to 
> > > > google-appengine-java+unsubscr...@googlegroups.com.
> > > > For more options, visit this group 
> > > > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Google App Engine for Java" group.
> > > To post to this group, send email to 
> > > google-appengine-j...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > google-appengine-java+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine for Java" group.
> > To post to this group, send email to google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to