Indeed this is the recommended method for doing this type of stuff on GAE. Space is cheap.
On Sep 26, 4:50 pm, Savraj <[EMAIL PROTECTED]> wrote: > Thanks for the replyMahmoud. Your proposal is good, but yes it > does mean I would make many queries which could be time consuming. > > Another alternative I'm considering is simply trading space for time > -- that is, on save of a new data point, save out some averages for > broader periods (min, hour, day, etc). This way I could get fewer > points back, if I just look at hourly averages over 3 days... > > Thanks again. > > -s > > On Sep 26, 3:03 pm,Mahmoud<[EMAIL PROTECTED]> wrote: > > > If you're trying to infer some type of statistical information from > > the dataset after it has been stored, then this might be difficult, > > especially in the absence of background/offline processing. > > > However, here is something you might want to try, for the particular > > scenario you describe: > > 1. Create an indexable property for each entity/entry as you store > > it. > > Looking at your data, it looks like the timestamp is sufficient, > > because each entry has a unique timestamp so you won't have to worry > > about breaking ties. > > > 2. You now want to fetch 1000 entities at known intervals. So > > extrapolate the timestamps of where those entities fall and fetch > > them. Unfortunately, this means that you have to make 1000 queries (I > > believe the datastore queues queries up, to a max of 35), so you might > > have to do this in multiple requests, and append the entities you > > fetch each time to a list. > > > On Sep 25, 11:46 am, Savraj <[EMAIL PROTECTED]> wrote: > > > > So I have stored some data in the app-engine database, with new data > > > every 5 seconds. > > > > example dataset: > > > > ID - Time - Value > > > 1 - 9/20/2008 16:00:00 - 100 > > > 2 - 9/20/2008 16:00:05 - 120 > > > 3 - 9/20/2008 16:00:10 - 130 > > > 4 - 9/20/2008 16:00:15 - 250 > > > ....... > > > 17278 - 9/21/2008 15:59:60 - 200 > > > 17279 - 9/21/2008 15:59:55 - 100 > > > 17280 - 9/21/2008 16:00:00 - 220 > > > > How do I get just 1000 values back that cover the entire recorded > > > period, so I can put them in a chart? What sort of query should I > > > construct? I imagine it's something like, 'give me every 20th value' > > > -- but how do I express than in a query? > > > > Thanks in advance for your kindness and consideration. > > > > - s --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---