Thank you for the quick and very informative reply. I wasn't even
aware this was possible with NDB. How would those x.yref.get() calls
show up in AppStats? Or would they at all if it's just pulling it from
memory?
Thank you Kaan as well, I will actually experiment with the
PickleProperty and see what's faster. I like that solution because the
X kind is not one I expect to be heavily cached so I don't mind
actually caching the pickled instance as I expect them to be evicted
within a relatively short amount of time.
I also wanted to ask: I saw someone did a speed test with NDB and I
noticed he was pulling 500 entities of 40K and in the worst-case 0%
cache hit scenario, it took something like 8-10 seconds. I was
actually planning to have a piece of my application regularly query
and cache ~2500 entities(of 2500) and sort on it to avoid a huge
amount of indices(and a NOT IN filter that would really slow things
down). Is this feasible or would you expect his results to scale, i.e.
500 entities with 0% cache hits * 5 ~= 40-50s in my usage scenario? Or
was there something unique to his situation with his indices and large
amount of data? In mine each entity has about 10 properties with zero
indices. If this is the case I'll probably copy the entities into a
JsonProperty that occasionally gets updated and simply query/cache
that since I don't expect the 2500 entities to change very often.
Thanks,
Richard