How to edit the SQL Query behind the cube processing

Comanchi 6 Reputation points
2021-09-20T13:43:06.903+00:00

Hi All,
My cube is taking forever to process, the FACT has 54 million and one of the dimension has 14 million rows. I cannot partition the FACT based on the year as there are many dates.
When i process the cube i see the following SQL and i want to know if there is a way to Edit the SQL
133653-capture.png

Thanks

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,260 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alexei Stoyanovsky 3,416 Reputation points
    2021-09-20T15:23:46.337+00:00

    You cannot edit the whole of the SQL because its final version is generated by the engine, but it does minor changes such as adding selecting a constant 1 if you use a count measure. For the most part you can influence the code in wherever it comes from, query binding for partition / DSV level query / data source.
    What seems more important is that the fact having many dates is by no means a block to partitioning the measure group.
    And, you might be able to pare down that huge dimension by pre-filtering the values that do not appear in facts.


  2. CarrinWu-MSFT 6,866 Reputation points
    2021-09-21T08:41:53.55+00:00

    Hi @Comanchi ,

    Agree with AlexeiStoyanovsky, and maybe below links could help you:
    SSAS - Best Practices and Performance Optimization
    Improving cube processing time

    Best regards,
    Carrin


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments