google app engine - GAE in About splitting an entity into two for performance.(golang) -
i have entity account contain 2 groups of information.
account { a1 // group 1 change a2 a3 a4 ... b1 // group 2 change b2 b3 b4 ... } first group general info not update frequent group 2 changing frequently.
i wonder if should extract group 2 entity , store key in account when update group 2, need put() data of group 2.
my concern is, operation server require data both group 1+2. if split account 2, need 2 get() retrieve both data.
i know read form data store inexpensive write. splitting entity don't reduce call put(). in case, don't know if should focus performance on put() or get().
thanks
if data in group 1 doesn't change, indexes don't updated, there's no monetary cost involved updating them, while there cost doing second fetch.
you need data doesn't make sense split them.
the benefit splitting in performance. fetching/putting small entity takes less time big entity. so, example, if group 1 big (as in total size in bytes) , didn't need data, improve performance fetching/putting entity group 2. doesn't sound scenario.
if group 1 500kb, i'd consider splitting it. although if have fetch group 1 time anyways, nullifies benefit.
Comments
Post a Comment