Following your suggestion, I tried setting FlushModeType to COMMIT (the only 
other value supported with EJB3) as follows, but the query is as slow as before.


  |     public List< TestData > select( int accountId, Timestamp timeScheduled 
) {
  |             Query query = em.createNativeQuery( "select * from test_data 
where account_id = ? and time_scheduled > ?", TestData.class ).setParameter( 1, 
accountId ).setParameter( 2, timeScheduled );
  |             query.setFlushMode( FlushModeType.COMMIT );
  |             List< TestData > rows = query.getResultList();
  |             return rows;
  |     }
  | 

If there was some unexpected flushing going on, wouldn't there be additional 
calls to the DB server?  I have hibernate.show_sql=true and from the logs there 
are no other queries being executed other than the above select statement.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988411#3988411

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988411
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to