Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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

  • Anonymous's avatar
    Anonymous
    Not 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:

    https://blog.crossjoin.co.uk/2018/03/16/improving-the-performance-of-aggregation-after-a-merge-in-power-bi-and-excel-power-query-gettransform/

     

    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

    • Anonymous's avatar
      Anonymous
      Not 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

      • Anonymous's avatar
        Anonymous
        Not 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