Forum Discussion

ak77's avatar
ak77
Icon for Post Patron rankPost Patron
2 years ago
Solved

Direct Query Performance

Hi All,   i need a help for an existing direct query power bi dashboard.   The direct query uses PortfolioCodeParameter as input for the selected PortfolioCode from dashboard and gets the data fr...
  • lbendlin's avatar
    2 years ago

     

    The total records retrieved once is around 500,000(1/2 million)  and there are 10 measures that are being calculated once data is retrieved,

     

    No, not once.  EVERY. SINGLE. TIME.  a user interacts with the report element that uses that data source.

     

    Note that there is a hard 1M row limit for Direct Query result sets. You are already at half that limit.  You will want to consider aggregating your data at the source to drastically reduce the amount of data traveling over the nework for each query. 

     

    At a minimum you will want to put an index on portfolio_code and make sure the statistics are kept up to date. However you will also want to examine the actual SQL query and add more indexes accordingly.