On Nov 4, 6:48 pm, Eli <eli.jo...@gmail.com> wrote:
> Stephen,
>
> My thinking on this is..
>
> Say you have a Month Column.. and it has the default lexically sorted
> asc,dsc indexes on it.
>
> My assumption is, when you insert a new row with a Month value
> defined, the entire index will have to be updated (no matter how many
> shards or tablets it's broken up into).


No. One new entry will be added to the ascending index bigtable, and
one new row will be added to the descending index bigtable.


> This is supported by this quote from the Index Building document you
> linked to:
>
> "When an entity is created or deleted, all of the index rows for that
> entity must be updated."


- By 'entity' they mean a single instance of an etity, i.e. a row, not
a 'type'.

- And by 'all indexes' they mean index entries for all attributes of
that single entity, i.e. an entity with two integer attributes would
have four index entries created, 1 asc and 1 desc for each attribute.

They are just trying to draw a distinction between when an entity
which is created or deleted, and when it is updated, which they cover
in the next sentence:

"However, when an existing entity is updated, the datastore determines
the delta, i.e. the properties that were changed, and only updates the
index rows that include those properties."

I guess this optimisation is worth mentioning in the docs because you
can't do an SQL-like:

    update Entity set attr_1 = 42 where key = 99.

...you can only overwrite all attributes, and so you may expect this
to trigger index updates for all attributes. But no, apparently this
is optimised out.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to