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

New script to create SQL baseline from AWR and some changes in the hint.sql #34

Merged
merged 4 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions hint.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.

select name,version,version_outline,inverse from v$sql_hint where lower(name) like lower('%&1%');
col name for a35
col version for a15
col version_outline for a15
col inverse for a35
col statement_level for a17
col query_block_level for a17
col object_level for a17
col join_level for a17
select
name,
version,
version_outline,
inverse,
decode(bitand(target_level,1),0,'NO','YES') AS statement_level,
decode(bitand(target_level,2),0,'NO','YES') AS query_block_level,
decode(bitand(target_level,4),0,'NO','YES') AS object_level,
decode(bitand(target_level,6),0,'NO','YES') AS join_level
from v$sql_hint
where lower(name) like lower('%&1%');