I have a couple of HQL queryes that takes rather more time that they should to execute. I am trying to improve the execution time by modifying the queries and I dont know how. Perhaps I am missing something.
The first query:
The second one:
I stress the fact that I am looking for a better way to improve the current HQL query construction.