Hmm, that's interesting. So, this suggests that Inserts take the same amount of time.. whether a Model has 100,000,000 Entities or 100 Entities(presuming the Model has no extra indexes defined and all Properties of the Model are required).
Is that really true? If so, I guess it's good and bad. Though, it's a little annoying since it means I need to do more reading/watching Datastore info since my understanding is flawed when it comes to Index structure.. I was watching the "App Engine Datastore Under the Covers" presentation again.. and I think I understand your description of the Index Rows now: http://www.youtube.com/watch?v=tx5gdoNpcZM On Nov 4, 7:34 pm, Stephen <[email protected]> wrote: > On Nov 4, 10:20 pm, Eli <[email protected]> wrote: > > > > > > > I want to get our wordology clear (let me know where I am going > > wrong): > > > A Model in AppEngine is equivalent to a Table in SQL (or, if you like, > > it is equivalent to the Table Schema). > > > An Entity in a Model is equivalent to a Row in a Table. (so.. a Model > > is potentially a collection of Entities in the same way a Table is > > potentially a collection of Rows) > > > Properties (of the Entities) in a Model are equivalent to Columns (of > > the Rows) in a Table. > > > Maybe the confusion comes in with the wordage: "all of the index rows > > for that entity must be updated" > > > What is an index row? I am assuming that an "index row" for a certain > > property is a row entry in BigTable that contains all index > > information for all Entities in the given Model that have that > > property defined. > > No, there is an single index row for each property of each entity. > > > So, there would be an "index row" for the Month Property of your Stats > > Model defined above. > > Yes. > > > And, when an Entity was inserted or Deleted for > > this Stats Model, the index row for Month would have to be rebuilt. > > No. The index rows are like the entity rows. Only the rows in the > index which correspond to the properties for that particular entity > need to be inserted/deleted. > > > I understand that I can be completely wrong on this.. but let me know > > where the flaw in my understanding of Entities, Models and Indexes > > might be. > > I like to think of it something like this: > > create table BigTable ( > key varchar primary key, > properties blob > ); > > All the properties are serialised (using Protocol Buffers) into the > blob. This is how you can have entities of the same type with > different properties. > > When you put() an entity, the db looks at the properties blob (because > it understands the serialisation format) and if it finds eg. a single > integer property, it inserts a row into the AscendingIndexBigTable, > and another into the DescendingIndexBigTable. > > The indexes could look similar to the entity table, except imagine > changing the key key to "eli/E1/a1=42" for the a1 property. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
