Skip to content

Instantly share code, notes, and snippets.

@pr4v33n
Created January 30, 2012 13:36
Show Gist options
  • Save pr4v33n/1704437 to your computer and use it in GitHub Desktop.
Save pr4v33n/1704437 to your computer and use it in GitHub Desktop.
Batch operations
09:41:38 PM) h0x5f3759df: Hi, is there any limit on batch write for db.put() ?
(09:42:41 PM) h0x5f3759df: if i have to put 100 entities, Should i put them in batches of 10 using db.put() or can i do db.put() on all 100 in a single go?
(09:48:36 PM) mbw: you should be able to do all at once
(09:54:38 PM) dw: h0x5f3759df: the limit is on the size of the underlying RPC iirc, which is (i think?) is 10mb
(09:59:07 PM) Sonderblade left the room (quit: Quit: L?mnar).
(09:59:37 PM) mbw: the sdk will split it up for you
(10:00:03 PM) mbw: it didnt used to do that,but will now
(10:00:35 PM) proppy: 1mb
(10:00:45 PM) proppy: for db.put() is the limit
(10:00:49 PM) mbw: 1mb per entity, not rpc
(10:00:54 PM) proppy: """For example, with a batch db.put() call, the total size of all entities being saved must not exceed one megabyte"""
(10:01:06 PM) proppy: from the documentation http://code.google.com/appengine/docs/python/datastore/entities.html
(10:01:11 PM) mbw: thats epicly old
(10:01:20 PM) proppy: ok, so I should fill a doc bug :)
(10:02:12 PM) mbw: 1mb per entity, 10mb rpc, but the sdk will split up calls for you
(10:03:19 PM) chachan_ [~quassel@190.72.18.149] entered the room.
(10:03:41 PM) chachan left the room (quit: Read error: Connection reset by peer).
(10:04:21 PM) h0x5f3759df: thanks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment