Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Short answer, <em>Yes</em> if you indexed the property.</p> <p>App Engine limits the number of property values a single entity can have on an index (number of rows * the number of columns) since it needs to create an index for each permutation. In the case of a single index property you have 5000rows * 1column = 5000.</p> <p>To show why App Engine does this let's take the example from their <a href="http://code.google.com/appengine/docs/python/datastore/queries.html#Big_Entities_and_Exploding_Indexes" rel="nofollow">documentation</a>.</p> <p>Model:</p> <pre><code>class MyModel(db.Model): x = db.StringListProperty() y = db.StringListProperty() </code></pre> <p>Index.yaml</p> <pre><code>indexes: - kind: MyModel properties: - name: x - name: y </code></pre> <p>Execution</p> <pre><code>e2 = MyModel() e2.x = ['red', 'blue'] e2.y = [1, 2] e2.put() </code></pre> <p>In this case, App Engine will have to create 12 indexes for this datastore entry alone, since effectively you can search for any combination of values:</p> <pre><code>x1 x2 y1 y2 x1 y1 x1 y2 x2 y1 x2 y2 y1 x1 y1 x2 y2 x1 y2 x2 </code></pre> <p>Now if you had 100 values in each property, you can imagine that the list would sky rocket to an obscene amount of queries.</p> <p>The equation is <em>something</em> like this:</p> <pre><code>len(x) + len(y) + (len(x)-1 * len(y) * (len(x) + len(y))) = number of indexed **2 values per property** 2 + 2 + (1 * 2 * (2 + 2)) = 12 **100 values per property** 100 + 100 + (99 * 100 * (100 + 100)) = 1,980,200 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload