Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Oracle Hints in subqueries(How can i set custom hints in each subquery.)
Oracle Hints in subqueries [message #1832060] Mon, 07 September 2020 15:16
Rafael Garcia is currently offline Rafael GarciaFriend
Messages: 1
Registered: September 2020
Junior Member
Dear all,

Eclipselink version: 2.6.9

How can i add custom hints in each subquery?

I'm trying to replicate the SQL below but I can't to set hints in the class javax.persistence.criteria.Subquery.

SELECT /*+ NO_PARALLEL */ a.name FROM UserData a WHERE EXISTS(
SELECT /*+ NO_UNNEST NO_PUSH_SUBQ */ 1 FROM UserData a WHERE a.name = "bla bla"
);

-- Note that I need is to set the NO_UNNEST && NO_PUSH_SUBQ in order to force the SQL optimizer to don't join the result of the subquery to the main body.

I'm trying this formula:
Subquery<UserData> subquery = (from CriteriaQuery<Tuple>).subquery(UserData.class);
((SubQueryImpl<UserData>)subquery).getDatabaseQuery().setHintString("/*+ NO_UNNEST NO_PUSH_SUBQ */");

Could you help me in that point? I don't know if there is any official way to accomplish this goal, or if i need to set it as a literal in the subquery' select...

Thank you

Regards,
Rafael

[Updated on: Mon, 07 September 2020 15:59]

Report message to a moderator

Previous Topic:Null Pointer Exception when Marshalling
Next Topic:Package org.eclipse.persistence.internal.libraries.asm not found building EclipseLink 2.7.0
Goto Forum:
  


Current Time: Fri Apr 26 09:43:59 GMT 2024

Powered by FUDForum. Page generated in 0.03071 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top