Size of index in case of exploding index

2 views
Skip to first unread message

Nash

unread,
Sep 1, 2008, 10:46:49 AM9/1/08
to Google App Engine
Hello folks,

The documentation here:
http://code.google.com/appengine/docs/datastore/queriesandindexes.html#Big_Entities_and_Exploding_Indexes

says that given a model thus:

class MyModel(db.Expando):
pass

and an instance thus:

e2 = MyModel()
e2.x = ['red', 'blue']
e2.y = [1, 2]
e2.put()

then the following index:

indexes:
- kind: MyModel
properties:
- name: x
- name: y

will generate 8 rows in the index table. Can anyone explain how?

I thought it would be 4 like this:
x, y
'red', 1
'red', 2
'blue', 1
'blue', 2

Also, in case of a repeating property:

indexes:
- kind: MyModel
properties:
- name: x
- name: x

will this also have 8 rows?

I'd love to hear your input

Nash

unread,
Sep 1, 2008, 10:50:24 AM9/1/08
to Google App Engine
The topic is a misnomer, it should be Size of index in case of multi-
property attributes

On Sep 1, 7:46 pm, Nash <nasrul...@gmail.com> wrote:
> Hello folks,
>
> The documentation here:http://code.google.com/appengine/docs/datastore/queriesandindexes.htm...

ryan

unread,
Sep 1, 2008, 7:08:02 PM9/1/08
to Google App Engine
hi nash! the extra four index rows come from the built-in single
property indexes. in this example, they'll need two index rows for x
and two for y. you're right, the docs don't fully describe this. i'll
update them. thanks for the nudge!

as for your repeated property index, yes, it will also have 8 index
rows, four for the built-in indexes for x and y and four for each (x,
x) permutation.

Nash

unread,
Sep 1, 2008, 8:09:15 PM9/1/08
to Google App Engine
Great, thanks!
Reply all
Reply to author
Forward
0 new messages