Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8676927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:19:19+00:00 2026-06-12T20:19:19+00:00

I have a question about updating field in GAE database. My problem looks like

  • 0

I have a question about updating field in GAE database. My problem looks like this:

class A(db.Model):
    a = db.StringProperty()

and I added bool field:

class A(db.Model):
    a = db.StringProperty()
    b = db.BooleanProperty(default=False)

Now my problem is I’d like to have every instance of model b == False.

To update it I could of course drag them out of datastore and put them back there, but there is 700k elements there already and I really don’t know how to do it efficiently. I can’t take them out at once because I get soft memory exceeded errors. If I try to do it with little chunks – it costs me many db read operations. Do you have any idea how else I could update my datastore?

Cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:19:20+00:00Added an answer on June 12, 2026 at 8:19 pm

    I agree with @ShayErlichmen. However, if you really want to update every entity, the easiest way is to use the MapReduce library:
    http://code.google.com/p/appengine-mapreduce/

    It’s not as easy as it sounds, because the documentation sucks, but this is the getting started point:
    http://code.google.com/p/appengine-mapreduce/wiki/GettingStartedInPython

    You just write a function foo() that will check the value of each entity passed to it, and if necessary, write update the value of your Boolean, and write it.

    The library will grab batches of entities and send each batch to a separate task. Each task will run in a loop calling your function foo(). Note that the batches run in parallel, so it may launch a few instances in parallel, but it tends to be quick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about NSFetchedResultController updating problem. As you may have already known,
I've got a question about updating attributes. I have an user model and also
I have question about parsing in Html helper : I have sth like: @foreach
I have a question about this formula from a book: EFW (cm,kg)= 10^(-1,7492+(0,166*BPD)+(0,046*AC)-(2,646*AC*BPD/1000)) The
I have asked a question on SuperUser about updating Ruby version in Google SketchUp
I have a question that is driving me crazy. It is all about updating,
I am posting this question after reading other similar questions about my problem but
I am fairly new to jquery and I have a question about updating data
I develop my first android application, so i have a question about its updating.
I have a question about updating table through t-sql. The client may want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.