Forum Discussion
Optimizing inner join between dim and fact table
Hi,
I am fetching some data with the Google BigQuery connector and doing an inner join between a customer dim table and the fact table.
This is taking some time and I want to hear if anyone have any best practice tips for what can make it go faster? I have looked into Native Query and that doesn't work very well with the BigQuery connector, but I want to hear if anyone else have any tips or ideas.
Best,
Ali A
5 Replies
- AnonymousNot applicable
Hi Anonymous ,
depends on how you do the merge - assuming in PQ, not on the server side via SQL or alike, this can help a bit:
Also try to reduce the size of the tables being merged to a bare minimum (i.e. filter off all unnecessary data, remove all unnecessary columns before the merge, not after).
Depending on the size of your fact table, try to Table.Buffer() it before the merge and test if this improves performance (note that it can actually make it worse).
Kind regards,
JB
- AnonymousNot applicable
This is a very good tip.
I will try this.Do you have any pracitcal examples of Table.Buffer() ?
Thanks for responding!Best,
Ali A
- AnonymousNot applicable
Anonymous
When I do the inner join it reads all the row from the fact table and then does the inner join.
Can't this be optimized in some way that it doesn't have to load all of this every single time? I
Best,
Ali A