Skip to content

Commit

Permalink
Deduplicate postgres relations (#3058) (#4521)
Browse files Browse the repository at this point in the history
* Deduplicate postgres relations (#3058)

* Add changelog entry for #3058, #4521
  • Loading branch information
netbek authored Feb 21, 2022
1 parent 5808ee6 commit 10b27b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Contributors:

### Fixes
- Fix bug causing empty node level meta, snapshot config errors ([#4459](https://github.com/dbt-labs/dbt-core/issues/4459), [#4726](https://github.com/dbt-labs/dbt-core/pull/4726))
- Fix slow `dbt run` when using Postgres adapter, by deduplicating relations in `postgres_get_relations` ([#3058](https://github.com/dbt-labs/dbt-core/issues/3058), [#4521](https://github.com/dbt-labs/dbt-core/pull/4521))

## dbt-core 1.0.3 (TBD)

Expand Down
2 changes: 1 addition & 1 deletion plugins/postgres/dbt/include/postgres/macros/relations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from pg_class
),
dependency as (
select
select distinct
pg_depend.objid as id,
pg_depend.refobjid as ref
from pg_depend
Expand Down

0 comments on commit 10b27b9

Please sign in to comment.