I have a root Account entity:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Account implements Serializable{
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent(mappedBy = "account")
    @Order(extensions = @Extension(vendorName="datanucleus", key="list-
ordering", value="key asc"))
    private List<Note> notes;

    //....

}

and a child Note:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Note{
        @PrimaryKey
        @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
        private Key key;

        @Persistent
        private Text note;

        @Persistent
        private List<String> words;

        @Persistent
        private Key contact;

        @Persistent
        private Key project;

        @Persistent
        private Key createdByContact;

        @Persistent
        private Date date;

        @Persistent
        private Account account;

        @Persistent
        @Extension(vendorName="datanucleus", key="gae.parent-pk",
value="true")
        private Key accountKey;
}

and these indices on Note:

contact ▲ , date ▼
date ▼
project ▲ , date ▼
words ▲ , date ▼

I'll look more closer into the suggestions in the video and see if
they can help me.

Lucian

On Jan 15, 8:55 pm, "Ikai L (Google)" <[email protected]> wrote:
> Brett Slakin on the App Engine team gave a great talk about a problem
> similar to what you are describing at last year's Google I/O and how to
> solve it. You may want to check this video out:
>
> http://code.google.com/events/io/2009/sessions/BuildingScalableComple...
>
> <http://code.google.com/events/io/2009/sessions/BuildingScalableComple...>How
> are your models current set up?
>
>
>
>
>
> On Fri, Jan 15, 2010 at 1:10 AM, Lucian Baciu <[email protected]> wrote:
> > I have a root User entity and a child Note entity. Each User can have
> > many Note entities. The Note entity has four indices.
>
> > I've noticed that as the number of Note entities for a User increases
> > so does the request time/latency and CPU used on Note insert
> > operations. When the number on Note entities for a user is about 1000,
> > an insert Note request takes about 10 seconds in request time and
> > about 40 seconds of CPU, which is very high and as it continues to
> > increase it makes my app unusable.
>
> > Is there something I can do to optimize this, or is this an app engine
> > issue?
>
> > Thanks,
> > Lucian
>
> > --
> > 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
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-appengine-java%2B 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.


Reply via email to