| Hi, We are using hibernate-jpa-2.1 API in our application. Hibernate queries run very slow sometimes. Under same load/ heap or memory usage sometime the query takes in millisecond and the same query other times takes in seconds. We are using JBOSS 6.X as our server. EJB 3.0 for our transaction management. I tried every possible suggestion available on internet. e.g doing lazy loading of child entities, using flush mode as commit, clearing entity manager after every flush. But nothing seem to work. find by id query also sometimes takes in seconds. I assure you tables are indexed correctly. Is it a bug. If we dont find solution quickly we might have to switch to regular SQL calls. |