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

Rewrite relationships schema test for improved performance #872

Conversation

MartinLue
Copy link
Contributor

  • Replace WHERE foo NOT IN subquery with LEFT JOIN
  • Use SELECT DISTINCT to avoid double counting if relationships test is applied on fields with non-unique values

Replace WHERE foo NOT IN subquery with LEFT JOIN Use
SELECT DISTINCT to avoid double counting if relationships test is applied on fields with non-unique values
@MartinLue
Copy link
Contributor Author

MartinLue commented Jul 23, 2018

@jthandy Tristan, we recently discussed the poor performance (at least on our Postgresql db) of the dbt relationship tests. Here is our take on how this should look like.

@MartinLue MartinLue changed the title Rewrite SQL for improved performance Rewrite relationships schema test for improved performance Jul 23, 2018
@MartinLue
Copy link
Contributor Author

MartinLue commented Jul 23, 2018

Oh this PR seems to duplicate #799. Nevermind.

@cmcarthur
Copy link
Member

fixed in #921 , closing

@cmcarthur cmcarthur closed this Aug 23, 2018
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

Successfully merging this pull request may close these issues.

2 participants