association « Performance « JPA Q&A

1. (1+N) selects with OnetoOne associations

Considering the following model:

public class User {

    @Column(name = "USER_ID")
    private Long userId;

    @Column(name = "FIRST_NAME")

2. many-to-one performance when association is not found

hi all - I've ran into an interesting performance bump - would appreciate community's input on the issue. We have a legacy schema (DB2/400, 5.4) and pretty much 99% of all columns are CHAR that are padded with spaces (instead of nulls). So, in the actual table you can see column values like Code: ' ...

3. performance problems with one-to-many association

Hi, I have some performance problems, when initializing the RwpXVersRelevants-set with Hibernate.initialize(). When I take a look at the SQL-statements I see, that there is first a select on "X_VERS_RELEVANT" by "IDVAR". This returns a result of 8 rows. For every row there is another request on "X_VERS_RELEVANT" by "IDVAR" and "IDRELV". The first select has all the information needed. So, ...

4. Performance problem with one-to-many Association

Hi, I have some serious performance problems by lazy initializing the child records in an one-to-many Association. When performing Hibernate.initialize(catiaVariable.getRwpXVersRelevants()) there is a lot more of SQL traffic I expected... First there is a select on "RWP_X_VERS_RELEVANT" by column "IDVAR" (which I expected). There are n rows returned. But then there is for every row a new select on "RWP_X_VERS_RELEVANT" by ...

5. Slow Performance with Association bulk inserts

Hello, I am using hibernate(3.1) and Oracle DB version 10G and Springs in our application. I am experiencing an issue with Association. The Association we have implemented is kind of Parent(Batch)-> Child(Person) -> Grand Childs(PersonAttributes, PersonTracking). It is done using JPA. It is a one to Many relationship between batch and Person and again a onetoMany Person and PersonAttribute or Person ...