JPA : optimize EJB-QL query involving large many-to-many join table
- by Fabien
Hi all.
I'm using Hibernate Entity Manager 3.4.0.GA with Spring 2.5.6 and MySql 5.1.
I have a use case where an entity called Artifact has a reflexive many-to-many relation with itself, and the join table is quite large (1 million lines). As a result, the HQL query performed by one of the methods in my DAO takes a long time.
Any advice on how to…