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

Improve BQ performance by changing 'LEFT JOIN' by ', UNNEST()' #24

Open
kokevidaurre opened this issue Sep 5, 2019 · 2 comments
Open

Comments

@kokevidaurre
Copy link

Hi,
As suggest, you can get better performance on large dataset using UNNEST instead LEFT JOIN when joining subrecords of the BQ schema.

Also is necessary to add hit id to all that subrecords tables to keep consistency on counts.

@ernestoongaro
Copy link
Contributor

Hi @kokevidaurre - do you have any examples/documentation of where UNNEST is faster than LEFT JOIN UNNEST?

@kokevidaurre
Copy link
Author

Hi @ernestoongaro.
No, just the official BigQuery documentation, but also experience within big datasets.
If you see the BigQuery Export Schema, you may find that is just a single table and there's no need to do a LEFT JOIN with it self.

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

No branches or pull requests

2 participants