The datastore can only count up to 1000 results of a query - for your
model you could use an ancestor query.
You are probably better off keeping a counter in the parent and
updating it every time you add or remove a child. Keep in mind that
all writes to the entire group must be executed serially which limits
the number of transactions per second (~5?)
On 14 Apr 2010, at 11:43, ailinykh wrote:
For example, I want to know a number of children. I guess if I just
call list.size()
it could be expensive. What are other ways?
Thank you,
Andrey
On Apr 12, 4:18 pm, "Ikai L (Google)" <ika...@google.com> wrote:
No, it should be fine UNLESS you want to load all these child
objects in a
single request. As a rule of thumb, load as little data as
possible. You may
need to denormalize (the datastore isn't relational anyway) for
additional
read performance.
For a better answer, you may want to describe what it is you are
trying to
do.
On Mon, Apr 12, 2010 at 6:57 AM, ailinykh <ailin...@gmail.com> wrote:
Hello, everybody!
I have objects with owned one to many relationship. Child table is
supposed to grow, each parent eventually will have thousands or even
more child objects.
May it cause any performance issues? Is there any best practice to
handle this situation?
Thank you,
Andrey
--
You received this message because you are subscribed to the Google
Groups
"Google App Engine for Java" group.
To post to this group, send email to
google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com<google-
appengine-java%2B unsubscr...@googlegroups.com>
.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.
--
Ikai Lan
Developer Programs Engineer, Google App Enginehttp://googleappengine.blogspot.com
|http://twitter.com/app_engine
--
You received this message because you are subscribed to the Google
Groups "Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
.
To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com
.
For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en
.
--
You received this message because you are subscribed to the Google Groups "Google
App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.