I'm working on resolving a performance issue with one of our java applications that uses QueryDSL to construct query statements. After working with our DBA it was suggested to me to add the following statement to our query:
option (hash join, recompile, maxrecursion 1)
Currently, we are executing our query something like:
Predicate predicate = LatestEvents.status.eq("DF_METADATA_SUCCESS");
return LatestEventsRepository.findAll(predicate, pageable);
I'm relatively new to QueryDSL but so far I have been unable to find out how we can add the suggested option statement to our query via QueryDSL. Has anyone been able to accomplish this?
Thanks in advance.
Apparently what I was looking to do is not possible because the query hints I need to add are SQL Server specific and not supported by QueryDSL.