Hello,

We are using JPA and the retrieval of one of our kinds seems to be
quite slow at about 3-4 seconds per 100 in production.  The entities
of this kind are not in the same entity group.  We have made some
adjustments to the kind recently which may have caused the slow down.
The persistent class definition is as below.  We used to have a blob
field for content which we have moved to a separate class
(ContentValue) and created OneToOne owned relationship with (we used
to have one blob for content but now we have 2 ContentValue fields).
Two of our fields used to be String but now has been converted to
List<String> fields.  We have added a OneToMany owned relationship to
another class.  We seemed to recall performance used to be better
prior to some of these adjustments.  Is the performance we're seeing
reasonable?

The query we issue is as follows with the number of results capped at
100 using setMaxResult on the query in JPA:
select c from Contributor c where id > someId

>From the retrieved query result, we do not access the two ContentValue
fields or the ContactCollection list.  Some datanucleus debug output
is also at the bottom.

Any insights into the performance would be appreciated.

Regards,
Len

@Entity
public class Contributor {
        @Id
        @GeneratedValue(strategy=GenerationType.IDENTITY)
        @Extension(vendorName="datanucleus", key="gae.encoded-pk",
value="true")
        private String id;

        @Enumerated
        @Extension(vendorName="datanucleus", key="gae.parent-pk",
value="true")
        private String userId;


        @Enumerated
        private String firstName;


        @Enumerated
        private String lastName;

        @Enumerated
        private String title;

        @Enumerated
        private String division;

        @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY )
        private ContentValue picture;

        @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY )
        private ContentValue thumbnailPicture;

        @OneToMany(cascade = CascadeType.ALL)
        private List<ContactCollection> collections = new
ArrayList<ContactCollection>();

        @Enumerated
        private String bio;

        @Enumerated
        private List<String> skills;

        @Enumerated
        private List<String> qualifications;

        @Enumerated
        private Date birthDate;

        @Enumerated
        private String workEmail;

        @Enumerated
        private String workOfficePhone;

        @Enumerated
        private String workMobilePhone;

        @Enumerated
        private String personalEmail;

        @Enumerated
        private String homePhone;

        @Enumerated
        private String personalMobilePhone;

        // accessors
        ...
}

DataNucleus Debug Output:
----------------------------------------
D 09-21 04:36PM 34.665
org.datanucleus.ObjectManagerImpl getObjectFromCache: Object with id
"com.jostleme.jostle.server.domain.Contributor:agpzaGFxYmFtYnUzchwLEgRVc2VyGN87DAsSC0NvbnRyaWJ1dG9yGAEM"
not found in Level 1 cache [cache size = 0]
D 09-21 04:36PM 34.667
org.datanucleus.ObjectManagerImpl getObjectFromCache: Object with id
"com.jostleme.jostle.server.domain.Contributor:agpzaGFxYmFtYnUzchwLEgRVc2VyGN87DAsSC0NvbnRyaWJ1dG9yGAEM"
not found in Level 1 cache [cache size = 0]
D 09-21 04:36PM 34.667
org.datanucleus.ObjectManagerImpl putObjectIntoCache: Object
"com.jostleme.jostle.server.domain.contribu...@12c4d93" 
(id="com.jostleme.jostle.server.domain.Contributor:agpzaGFxYmFtYnUzchwLEgRVc2VyGN87DAsSC0NvbnRyaWJ1dG9yGAEM")
added to Level 1 cache (loadedFlags="[NNNNNNNYNNNNNNNNNNNNNNNNNN]")
D 09-21 04:36PM 34.766
org.datanucleus.sco.backed.List <init>: Object
"com.jostleme.jostle.server.domain.contribu...@12c4d93" field
"collections" is replaced by a SCO wrapper of type
"org.datanucleus.sco.backed.List" [cache-values=true, lazy-
loading=true, queued-operations=true, allow-nulls=false]
D 09-21 04:36PM 34.773
org.datanucleus.ObjectManagerImpl getObjectFromCache: Object with id
"com.jostleme.jostle.server.domain.Contributor:agpzaGFxYmFtYnUzchwLEgRVc2VyGOA7DAsSC0NvbnRyaWJ1dG9yGAEM"
not found in Level 1 cache [cache size = 1]
D 09-21 04:36PM 34.773
org.datanucleus.ObjectManagerImpl getObjectFromCache: Object with id
"com.jostleme.jostle.server.domain.Contributor:agpzaGFxYmFtYnUzchwLEgRVc2VyGOA7DAsSC0NvbnRyaWJ1dG9yGAEM"
not found in Level 1 cache [cache size = 1]
D 09-21 04:36PM 34.774
org.datanucleus.ObjectManagerImpl putObjectIntoCache: Object
"com.jostleme.jostle.server.domain.contribu...@1845cce" 
(id="com.jostleme.jostle.server.domain.Contributor:agpzaGFxYmFtYnUzchwLEgRVc2VyGOA7DAsSC0NvbnRyaWJ1dG9yGAEM")
added to Level 1 cache (loadedFlags="[NNNNNNNYNNNNNNNNNNNNNNNNNN]")
D 09-21 04:36PM 34.805
org.datanucleus.sco.backed.List <init>: Object
"com.jostleme.jostle.server.domain.contribu...@1845cce" field
"collections" is replaced by a SCO wrapper of type
"org.datanucleus.sco.backed.List" [cache-values=true, lazy-
loading=true, queued-operations=true, allow-nulls=false]
D 09-21 04:36PM 34.806
org.datanucleus.ObjectManagerImpl getObjectFromCache: Object with id
"com.jostleme.jostle.server.domain.Contributor:agpzaGFxYmFtYnUzchwLEgRVc2VyGOE7DAsSC0NvbnRyaWJ1dG9yGAEM"
not found in Level 1 cache [cache size = 2]
D 09-21 04:36PM 34.806
org.datanucleus.ObjectManagerImpl getObjectFromCache: Object with id
"com.jostleme.jostle.server.domain.Contributor:agpzaGFxYmFtYnUzchwLEgRVc2VyGOE7DAsSC0NvbnRyaWJ1dG9yGAEM"
not found in Level 1 cache [cache size = 2]
D 09-21 04:36PM 34.806
org.datanucleus.ObjectManagerImpl putObjectIntoCache: Object
"com.jostleme.jostle.server.domain.contribu...@c4ef1" 
(id="com.jostleme.jostle.server.domain.Contributor:agpzaGFxYmFtYnUzchwLEgRVc2VyGOE7DAsSC0NvbnRyaWJ1dG9yGAEM")
added to Level 1 cache (loadedFlags="[NNNNNNNYNNNNNNNNNNNNNNNNNN]")
D 09-21 04:36PM 34.836
org.datanucleus.sco.backed.List <init>: Object
"com.jostleme.jostle.server.domain.contribu...@c4ef1" field
"collections" is replaced by a SCO wrapper of type
"org.datanucleus.sco.backed.List" [cache-values=true, lazy-
loading=true, queued-operations=true, allow-nulls=false]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to