Do you use em.Find() or a query to load your objects?
From what I know the query methods has to check all loaded entities
for changes which are to applied to the DB before the query is executed.
You could
add the following attributes to your persistance.xml to see whats going on:
| <property name="hibernate.show_sql" value="true"/>
| <property name="hibernate.format_sql" value="true"/>
| <property name="hibernate.use_sql_comments" value="true"/>
|
On the other hand, why do you load 1000 single objects within a single transaction?
Can't you load them all at once. That should perform much better...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959098#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...