Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hints don't work if they are in a view #203

Open
MariaLeone opened this issue Oct 7, 2024 · 0 comments
Open

Hints don't work if they are in a view #203

MariaLeone opened this issue Oct 7, 2024 · 0 comments

Comments

@MariaLeone
Copy link

MariaLeone commented Oct 7, 2024

Hints don't work on view level, for example:

CREATE OR REPLACE VIEW example_v AS
SELECT /*+ NoIndexScan(le) */
      le.id
     ,le.code2
FROM table1 le
WHERE le.code2= 'X';

The execution plan is run with no used hint, even thou the hint is defined on the view level
EXPLAIN  SELECT * FROM example_v WHERE id=1; --Index Scan using tbl1_pk on table1 le (cost=0.14..16.58 rows=1 width=194)

Needs hinting on the level of the select of the view.
However, many times the views are called from Java or other service, where those hints are not possible to be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant