Skip to content

Add ability to provide oracle hints #453

Open
@jdafda

Description

@jdafda

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;

Activity

changed the title [-]Added ability to provide oracle hints[/-] [+]Add ability to provide oracle hints[/+] on Feb 17, 2022
jeffgbutler

jeffgbutler commented on Feb 18, 2022

@jeffgbutler
Member

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

mklinkj commented on Mar 14, 2023

@mklinkj

hello.

I made an example.

thank you have a good day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Add ability to provide oracle hints · Issue #453 · mybatis/mybatis-dynamic-sql