On Thu, May 26, 2011 at 12:22 PM, Calvin <[email protected]> wrote:
>
>> It's probably fair to assume that his application is already billed
>> way beyond the free quota.
>
> True, but assuming there are days when traffic decreases, like weekends and
> holidays, having the delete task running slowly forever could end up being
> (slightly) cheaper than doing it all in one day. Plus, 12 $50 bills might
> go over with the accounting department better than 1 $600 bill.
You might be able to smooth over the billing, but I don't see how it's
going to be cheaper. It's going to cost $600 now or later.
By the way - GAE already does a sort of "mark as deleted" when you
delete something, then vacuums up the space in an asynchronous
operation sometime later. This is why a "repeat { delete first item
in query }" algorithm ends up being incredibly slow - internally, GAE
is skipping the deleted items so you end up with O(N^2) performance.
If you want to delete lots of stuff, get all the keys in advance or
use a Cursor.
Jeff
--
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.