Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 months ago
Solved

Merge taking too much time and refresh is failing

Expert, I need to merge two table both have record around 70,00,00. Have merge them using left outer join. But referesh is just keep on going and ultimately going for time out. Both Desktop and Data...
  • Mauro89's avatar
    10 months ago

    Hi Anonymous,

     

    Merging 7 million rows with another large table will always be slow in Power BI. Here are couple of options you can try:

     

    Best approach - Merge at the source:

    1. Use SQL/Database views: If both tables are from the same database, create a SQL view that joins them and import that single view into Power BI
    2. Push the merge to the data source: This is 100x faster than Power Query merging

    If you must merge in Power BI:

    1. Reduce rows before merging: Apply filters to both tables BEFORE the merge step to reduce row count
    2. Remove unnecessary columns: Keep only the columns you need from each table before merging
    3. Check data types: Ensure join keys are the same data type (both text or both numbers) - mismatches cause performance issues
    4. Use Table.Buffer: Before the merge step, add Table.Buffer(YourTable) to load the smaller table into memory first

    Alternative architecture:

    1. Use DirectQuery: Instead of importing, use DirectQuery mode - the database handles the join

    7M x 7M rows is beyond Power Query's best practise. You really need database-level joining.

     

    Best regards!

    PS: If you find this post helpful consider leaving kudos or mark it as solution