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 6346271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:59:08+00:00 2026-05-24T20:59:08+00:00

Even with all I do know about the AppEngine datastore, I don’t know the

  • 0

Even with all I do know about the AppEngine datastore, I don’t know the answer to this. I’m trying to avoid having to write and run all the code it would take to figure it out, hoping someone already knows the answer.

I have code like:

class AddlInfo(db.Model)
     user = db.ReferenceProperty(User)
     otherstuff = db.ListProperty(db.Key, indexed=False)

And create the record with:

info = AddlInfo(user=user)
info.put()

To get this object I can do something like:

# This seems excessively wordy (even though that doesn't directly translate into slower)
info = AddlInfo.all().filter('user =', user).fetch(1)

or I could do something like:

class AddlInfo(db.Model)
     # str(user.key()) is the key to this record
     otherstuff = db.ListProperty(db.Key, indexed=False)

Creation looks like:

info = AddlInfo(key_name=str(user.key()))
info.put()

And then get the info with:

info = AddlInfo.get(str(user.key()))

I don’t need the reference_property in the AddlInfo, (I got there using the user object in the first place). Which is faster/less resource intensive?

==================

Part of why I was doing it this way is that otherstuff could be a list of 100+ keys and I only need them sometimes (probably less than 50% of the time) I was trying to make it more efficient by not having to load those 100+ keys on every request…..

  • 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-05-24T20:59:09+00:00Added an answer on May 24, 2026 at 8:59 pm

    Between those 2 options, the second is marginally cheaper, because you’re determining the key by inference rather than looking it up in a remote index.

    As Wooble said, it’s cheaper still to just keep everything on one entity. Consider an Expando if you just need a way to store a bunch of optional, ad-hoc properties.

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

Sidebar

Related Questions

I know all about the history of different OSes having different path formats, but
Even after all the hotfixes and updates that are supposed to fix this, my
I'm always surprised that even after using C# for all this time now, I
I work on Linux all the time and I'm clueless about Windows, not even
Should we learn all CSS (till version3) even if all browser don't support and
using app engine - yes i know all about django templates and other template
I don't really know about C. So, my questions and ideas may be misleading
I normally store all my configs in the registry. Even though I have started
has anyone ever tried to get the list of all the movieclips (even the
I've been reading that some devs/dbas recommend using transactions in all database calls, even

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.