web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sql Server and Canvas ...
Power Apps
Unanswered

Sql Server and Canvas Apps

(0) ShareShare
ReportReport
Posted on by 1,002
Good evening everyone
 
I am developing a power apps application for a client, the database is in SQL Server, after the data becomes large more than 100,000 records (Tables and views) the client starts to complain about the slowness of data retrievals, even if we have increased the performance of the database the slowness remains and we have to wait even 5 minutes to retrieve the data.

I tried several methods like using collections but it didn't change anything because the max for collections is 5000 lines.
 
My question is: what are the solutions to solve this problem? Thanks in advance
I have the same question (0)
  • Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    What's the use case for having thousands of rows in the app?  Is it absolutely necessary or can you just retrieve much smaller groups as needed with delegated filtering/searching?  Usually you wouldn't need that many rows loaded.

     
  • gikido Profile Picture
    1,002 on at
    So how do I load batch by batch? Or do you have another solution?
  • Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    It all depends on what kind of data you are storing and what you're doing with it.  If you have to run some sort of calculations or graphing on thousands of rows, a canvas app probably isn't the right solution to start with.

    You might need to rethink what the purpose of the app is for.   The idea would be to come up with a plan for how to filter and search for only the records in the database that the user needs to do something with. Is the app to show the user brand new rows/records to approve?  Is it to show them aging records to decide to keep or delete?  Is it to show them records flagged for manual review?  Is it so they can search up any record they want and modify it?

    In any of these cases you want to just leave as much of the database as possible in the server outside the app.  Only pull in what you need when you need it.

    For example, if you have a gallery control that displays some items from your database, make a good filter and/or search function on the datasource.

    Something like "Sort(Search(Filter(<your data source>,<data source column to filter> = <your filter value>),txt_search_field.Value,<data source column to search>),<data source column to sort>, SortDirection.Descending)" 

    Whenever you change the search field input, or change the filter control selection or input, it will trigger the app to refresh the datasource, and send the search and/or filter conditions to the external server to return the data.  As long as your filter/search formula is delegable, the server will handle it and only return what you need.
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    In addition, think about using stored procedures for some operations.
    Provide details on the functionality that you are trying to achieve which requires retrieving a large number of records that cannot be solved using a stored procedure. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard