openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: Entity generation is very time consuming
Date Thu, 14 Jul 2011 12:53:11 GMT
Can you turn on SQL trace so we can see what is being generated? Perhaps
posting your Entity would also shed some light on what is going on.

On Thu, Jul 14, 2011 at 4:08 AM, M. Walter <marc.walter@sbb.ch> wrote:

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


-- 
*Rick Curtis*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message