Hi,

The method you describe (a datetime field that you update on each access) is
the most efficient way of doing this.

-Nick Johnson

On Tue, Dec 1, 2009 at 7:22 PM, mscwd01 <[email protected]> wrote:

> Hey,
>
> I wish to retrieve a single datastore object such that the object
> which has NOT been retrieved for the longest amount of time is
> returned.
>
> I.e. If object A was last retrieved 5 days ago, object B 2 days ago
> and object C 12 days ago the order of retrieval would be:
>
> Object B (first db call) -> Object A (second db call), Object C (third
> db call)
>
> I could simply assign a datetime field to each object and update this
> time during each retrieval, then organise all the objects by this
> field upon each database query. However, if I were to have tens of
> thousands of objects would this be an efficient way of achieving this?
>
> I'd be interested to know if there may be a better way of doing it.
>
> Many thanks
>
> --
>
> 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]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

--

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.


Reply via email to