I have thousands of SELECT statements that are executed one after the other, and it takes a lot of time in doing this(the query can be seen below), quering the DB multiple times, and also it is not possible to have a single query.
Query q = mEntityManager.createNativeQuery(newQuery);
List<Object> results = q.getResultList();
These statemenmts go inside a dynamic loop, which creates thousands of queries, is there a way to run them in batches, like we do it for insert and delete ?