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

Avoid nested loop in query planner execution #612

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20230923-091155.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: avoid nested loop in query planner execution of redshift__get_relations
time: 2023-09-23T09:11:55.2152725-04:00
custom:
Author: slin30
Issue: "609"
2 changes: 1 addition & 1 deletion dbt/include/redshift/macros/relations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ with
from pg_depend
left join pg_rewrite
on pg_depend.objid = pg_rewrite.oid
where coalesce(pg_rewrite.ev_class, pg_depend.objid) != pg_depend.refobjid
)

select distinct
Expand All @@ -36,7 +37,6 @@ join relation ref
on dependency.ref_relation_id = ref.relation_id
join relation dep
on dependency.dep_relation_id = dep.relation_id
where ref.relation_name != dep.relation_name

{%- endcall -%}

Expand Down