Showing results for 
Search instead for 
Did you mean: 
Impactful Individual
Impactful Individual

Those of you Using OnPrem SQL - Help with speed

All of my apps rely heavily on sql reading and writing and speed for the user is very slow if using offline capabilities is very slow when patching through a gateway.

I'm writing this to give some quick tips on how to handle this and improve (massively) the speed of your apps.

Reading Data:
If you have to perform filters on big tables this can be slow, one of my apps was taking around a minute to load data into collections). Not ideal.
In order to improve this I have created a list within SharePoint with the same columns, made a flow to collect sql rows overnight into this list with any filters that don't need user input. I can then use this list within powerapps which improves speed as it hasn't got to go through the gateway and get restricted by system resources on the onprem server and also the list is smaller as I've already performed some of the filter I need.

I was getting patch times of over 2 minutes writing back to SQL, especially if there were where clauses on tables of 5k plus rows.
I have now got this down to 10 seconds using this method:
Create a SharePoint list identical to the SQL table you want to patch
Patch everything to this list
Add a flow to do the legwork of updating the on Prem sql table with the SharePoint list data (this takes the load off of powerapps and the user experience)
In the flow Ensure that the list is cleared once the data is uploaded to sql.
You will also have to ensure that the user cannot reload data whilst the flow is running(as there is slight delay), you can get round this in powerapps by checking if the SharePoint list IsEmpty (you could also apply filters if there are writes from multiple people on different data)

I thought this maybe helpful to people as at the end of the day the app has to be quick for the users and no one wants to be waiting.
Community Support
Community Support

Hi @Delid4ve,


Thanks a lot for your sharing, I believe others who have the similar issue will benefit for your post.




Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper II
Helper II

 Do you have a write up or example related to this? I am having trouble with the flow to move from list -> sql table

Impactful Individual
Impactful Individual

1: Update the sharepoint list from powerapps

2: Add a flow with trigger set to powerapps (you should call this flow in your app code directly after updating the sharepoint list)

3:In your flow:

  • 1st action: Get rows (sharepoint list)
  • 2nd action: Update rows (SQL), select the correct table and then use the fields from the sharepoint list. (this will add an apply to each around the action)

You will probably need to add a condition 1st within the apply to each if you are adding AND updating so it knows whether to add the row or update.


Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (45,260)