Hi Nick,

Thanks for your incredible continued support in these groups!

Re: put() returning after indexes are updated - I confused myself with
the milestone A/B scenario from the transaction isolation article
(http://code.google.com/appengine/articles/
transaction_isolation.html), thanks for clearing that up.

Just to make sure I'm understanding correctly, if I do something like:

  # Get the top 2 Players
  players = Player.all().order("-high_score").fetch(2)
  # Move 2nd place above 1st place
  players[1].high_score = players[0].high_score + 1
  players[1].put()
  # Get the #1 Player (which should be the player that was 2nd)
  player = Players.all().order("-high_score").fetch(1)[0]

will the time taken to run this script be basically the same with 100
Player entities as it would with 100,000,000? If this is the case
then, much like low carb beer, the Datastore is truly a modern day
miracle.

Nick


On Dec 16, 3:46 am, "Nick Johnson (Google)" <nick.john...@google.com>
wrote:
> Hi Nickolas,
>
> On Tue, Dec 15, 2009 at 6:39 AM, Nickolas Daskalou <n...@daskalou.com>wrote:
>
> > I've read that the time for a Datastore query is independent of the
> > number of entities in an app, which is great.
>
> > However, does index updating take longer as the number of entities
> > increases?
>
> No, the time required for a datastore put is also independent of the size of
> the datastore.
>
>
>
> > Eg. If I'm making a high score tracking system (a Player kind with one
> > of the properties being high_score) and want to order by the highest
> > score for each player, as I update a player's high score will the
> > index be updated in the same amount of time if there were 100 Player
> > entities as it would if there were 100,000,000 Player entities?
>
> > I already know that the put() time will not change because it returns
> > before the index has been updated, I'm just concerned at how long the
> > high scores table (Player.all().order("-high_score")) will take to
> > reflect the changes.
>
> Indexes are updated synchronously - eg, before the put operation completes.
>
> -Nick Johnson
>
>
>
> > --
>
> > 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-appeng...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047

--

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-appeng...@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