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

Adding Anti-pattern Recognition tool to the Optimization Scripts #397

Merged
merged 9 commits into from
Mar 25, 2024
Prev Previous commit
adding anti pattern script, addressing duplicate hashes
  • Loading branch information
franklinWhaite committed Mar 24, 2024
commit d1e4d1671acc0fc2887c41f8fed152dc98fa645d
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ CREATE OR REPLACE TABLE optimization_workshop.antipattern_output_table (
);

CREATE OR REPLACE VIEW optimization_workshop.antipattern_tool_input_view AS
SELECT DISTINCT
SELECT
Query_Hash id,
Query_Raw_Sample query
ANY_VALUE(Query_Raw_Sample) query,
FROM
optimization_workshop.viewable_queries_grouped_by_hash
WHERE
Query_Hash is not null
GROUP BY
Query_Hash
ORDER BY
Total_Slot_Hours desc
ANY_VALUE(Total_Slot_Hours) desc
LIMIT
1000
;