Open
Description
Oracle has optimizer hint feature on select statements , add ability to provide this hits here is an example of PARALLEL hint
SELECT /*+ PARALLEL(4) */ customers.cust_first_name, customers.cust_last_name,
MAX(QUANTITY_SOLD), AVG(QUANTITY_SOLD)
FROM sales, customers
WHERE sales.cust_id=customers.cust_id
GROUP BY customers.cust_first_name, customers.cust_last_name;
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Added ability to provide oracle hints[/-][+]Add ability to provide oracle hints[/+]jeffgbutler commentedon Feb 18, 2022
There's not an easy way to do this now.
There is a test with an example of modifying the generated SQL before it is executed. It's not pretty, but it could work. You can see it here: https://github.com/mybatis/mybatis-dynamic-sql/tree/master/src/test/java/examples/paging
I'm working on an idea to make this kind of thing easier in the future with more defined callbacks.
mklinkj commentedon Mar 14, 2023
hello.
I made an example.
https://github.com/mklinkj/QnA/tree/master/MyBatis/mybatis-dynamic-sql-oracle-hint-test
https://github.com/mklinkj/QnA/blob/master/MyBatis/mybatis-dynamic-sql-oracle-hint-test/src/main/java/org/mklinkj/mybatis_study/App.java
I could put in a constant using
Constant<String>
.However, since
,
is always added, I had no choice but to adddummy
alias.thank you have a good day.