I have one single select query and the connection pool shows one connection
being obtained.

The entity has indeed many one-to-many and many-to-one relationships. So if
that should be the problem I created a DTO which has only the primary key
(Long) and a string. Then I used constructor expression filling up this DTO
instead of the entity with all its dependencies (SELECT NEW MyDto(t.id,
t.name) FROM Table t). I was very astonished about the fact that it just
lasted as long as the original entity creation! How can this be explained?
Nearly 27 seconds reading two fields from the database table and generating
60.000 DTOs? This is awfully low-performance! Are the JPA entities still
generated with all relationships if constructor expressions are used?

One thing: I'm using Oracle 11g, not 10g as written in my first posting.

--
View this message in context: 
http://openjpa.208410.n2.nabble.com/Entity-generation-is-very-time-consuming-tp6579389p6582447.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to