On Mar 4, 6:42 pm, Guy Rutenberg <g...@labpixies.com> wrote: > Hi, > > I've an app that gets some high number of requests (around 9k per > hour) to delete items. All it does for these requests is > > items = ModelName.all().fetch(1) > db.delete(items) > > (Origninally I've tried to delete more than one item at the time). > Hoever around 97% of the requests fail with Timeout. Is it a more > efficient way to delete items? Is this kind of failed requests > normal? (The table holds around 2 million objects). > > Also, is there a way to drop an entire model at once? > > Thanks, > > Guy
Guy, I am not sure I understand your code. Basically, it says: delete whatever ModelName the query returns. Is this what your app is supposed to do? If instead you are looking for deleting specific ModelNames then I've found the following to perform better: models = ModelName.get(key_sequence) (with the option ModelName.get_by_id(id_sequence)) ./alex --~--~---------~--~----~------------~-------~--~----~ 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 google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---