On 20 February 2010 21:21, kang <areyouloo...@gmail.com> wrote:
> I'm going to clear the datastore. I use the following code:
>     old_date = datetime.datetime(2009,10,1)
>     old_updates = SomeUpdate.all().filter("updated <",old_date).fetch(20)
>     db.delete(old_updates)
> it costs me nearly 1982cpu_ms 1945api_cpu_ms every time. Is it normal?

You might be able to save some time by using a keys_only query. See
this for details.

http://code.google.com/appengine/docs/python/datastore/modelclass.html#Model_all

Cheers,
Andy

-- 
contact: Andrew Chilton
website: http://www.chilts.org/blog/

-- 
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-appeng...@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