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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:09:09+00:00 2026-06-03T18:09:09+00:00

I got the following situation class M(db.Model): a = db.ReferenceProperty(A) x = db.ReferenceProperty(X) y

  • 0

I got the following situation

class M(db.Model):

    a = db.ReferenceProperty(A)

    x = db.ReferenceProperty(X)
    y = db.ReferenceProperty(Y)
    z = db.ReferenceProperty(Z)

    items = db.StringListProperty()

    date = db.DateTimeProperty()

I want to make queries that filter on (a), (x, y or z) and (items), ordered by date i.e.

mm = M.all().filter('a =', a1).filter('x =', x1).filter('items =', i).order('-date')

There will never be a query with filter on x and y at the same time, for example.

So, my questions are:

1) How many (and which) indexes should I create?

2) How many ‘strings’ can I add on items? (I’d like to add in the order of thousands)

3) How many index records will I have on a single “M” if there are 1000 items?

I don’t quite yet understand this index stuff, and is killing me. Your help will be very appreciated 🙂

  • 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-03T18:09:11+00:00Added an answer on June 3, 2026 at 6:09 pm
    1. For the criteria you have given, you only need to create three compound indexes: a,x,items,-date, a,y,items,-date, a,z,items,-date. Note that a list property creates an index entry for each property in the list.

    2. There is a limit of total 5000 index entries per entity. If you only have three compound indexes, than it’s 5000/3 = 1666 (capped at 1000 for a single list property).

    3. In the case of three compound indexes only, 3*1000 = 3000.

    NOTE: the above assumes you do not have built-in indexes per property (= properties are save as unindexed). Otherwise you need to account for built-in indexes at 2N, where N in number of single properties (2 is for asc, desc). In your case this would be 2*(5 + no_items), since items is a list property and every entry creates an index entry.

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

Sidebar

Related Questions

Situation Consider I've got the following class structure: // a user model class UserModel
I've got the following situation setup to model a Customer with multiple addresses and
I've got the following situation with ActiveRecord (in Rails 2.3.8): class Order < ActiveRecord::Base
I have a specific situation where I've got an object that I want to
I've got the following situation A rails application that makes use of rjs /
I've got the following situation: var totalRecords = (from entry in invalidAccEntryRepository select entry).Where(entry
I've got the following situation: A User object has a Set of Permission objects
We've got the following situation, running from a single domain: Page A uses window.open()
I've got the following situation: <h2>This text is <span>pretty awesome</span></h2> I'm trying to give
I've got the following situation: <html> <head> <title> Title </title> <style type=text/css> #wrapper {

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.