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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:23:46+00:00 2026-06-02T17:23:46+00:00

I am working on a GAE Python project which has items and transactions on

  • 0

I am working on a GAE Python project which has items and transactions on items.

At first, we tried to use an item kind and a transaction kind with a reference property, but it complicated a lot the queries.

So we switched to an all-in-one version with transaction data stored directly in the item, which resulted in a lot of attributes not being used, as not all items are concerned by transactions.

I expected it to speed up the app, but is this the best way to do this?

Knowing that:

  • we expect to have lots of transactions and many more items.
  • we need to check the transaction status (actually stored in the item’s status).
  • there is only one transaction possible per item but there are many different kind of transactions.

Is there a better solution?

EDIT:

The problem is that I mostly query on the items using the transaction attributes but only 2 where clauses at once maximum , also i update the transaction frequently.

Actually i have some thing like this:

class MyItem(db.Model):

owner = db.ReferenceProperty(MyUser)  
descr = db.StringProperty()  

status = db.IntegerProperty()  # contains item status / transaction status

tx_actor = db.emailProperty()
tx_token = db.StringProperty()
latest_tx_date = db.DateTimeProperty()
  • 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-02T17:23:47+00:00Added an answer on June 2, 2026 at 5:23 pm

    Since it’s a 1-to-1 mapping, it boils down to how many of the attributes of either the item or transaction you need to query by – those attributes need to be indexed, and how often you write your items or transaction.

    An example where it’s fine to merge them:
    – You rarely write your merged item/transaction object.
    – You query on a small set of attributes, many of the attributes do not need to be indexed.
    – When you do queries, you usually want both the item AND the transaction.

    An example where it’s a bad idea to merge them:
    – Your item has many indexed attributes, but your transaction has very few. But you need to update your transaction frequently. In this case you’d be better off keeping them separate, because every time you write the transaction, you incur all the write costs of updating the indices for the item.

    Another option, if you DON’T need to query on the transaction, is to store the transaction as JSON encoded, then you don’t need to define all the attributes up front. You could also use the Expando class.

    To get better answers, you’d be better off posting examples of what your items/transactions look like, and the types of queries you’d want to run.

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

Sidebar

Related Questions

I'm working on a project that runs off Google App Engine (Python) which stores
Working on a program in python to print out the first 1000 prime numbers
Working on my first Android app here. I've searched and tried everything I can
I am working on a GAE Django Project where I have to implementing the
I'm working on an intranet django project (not using GAE) for a company that
I'm working on a GAE Python app for running elections. I have an Election
After working on several GAE apps, some of which are being used for production,
While working on my GAE project under my dev environment, whenever I upload data
I'm working with a app that has both online datastore(GAE) and an offline datastore(HTML5
I am working on a GAE/J based project. One of the requirements is 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.