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 / How does performe quer...
Power Apps
Suggested Answer

How does performe quering to a local database through a data gateway vary versus a cloud database?

(1) ShareShare
ReportReport
Posted on by 23
I have a performance issue associated with a Power Apps application that through Power Automate flows queries an On-premise SQL database through a Gateway. I would like to know if this slowness is mainly due to the architecture of the solution. I have already tried running the Tscipts in SQL where the queries take milliseconds and the cost is very low. I can only think that this slowness is due to the fact that the database is not of cloud type.
 
Any comments on this matter?
 
Thank you very much.
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi
     
    There isn't a way for us to tell you that.
     
    1) We are not able to verify your configuration
    2) we are not able to verify your Power Apps to Power Automate code
    3) we cannot verify your On Premise Gateway
     
    and so on, you get the picture.
     
    However, what you should be doing, if its a local Database is (if its sql) running profiler, and then run your App and Flow
    This way you can do 2 things
     
    1) Look in your Flow run at each action and see how long each took
    2) you can look at the profile created to see why things took a long time OR if they didn
     
    Thats how you find it.
     
     
     
     
  • bslahsen Profile Picture
    23 on at
    FLMike, this question is oriented to the speed that a SQL-on premise configuration has versus a cloud-type SQL configuration, regardless of the code. I am just asking wich is faster 
  • Suggested answer
    timl Profile Picture
    36,411 Super User 2025 Season 2 on at
    Hi bslahsen

    All things being equal, performance should be slightly better with SQL Server Azure. This is due to the reduced latency in needing to connect to the gateway, and then from the gateway to your actual SQL server. 
     
    If you can give us further details, perhaps we can give other suggestions to improve performance. For instance, I assume you're using a Flow to execute dynamic SQL. If you can extract some of this logic into SQL Views, you could connect directly to data without going through Power Automate which would improve performance. If you were to consume this View data through a gallery, Power Apps can batch the data retrieval and it can minimise data transfer through the use of explicit column selection. This 2 features would further help performance.
  • lbendlin Profile Picture
    8,479 Super User 2025 Season 2 on at
    Please provide more details.
     
    - what is the setup of the gateway? How many cluster members? How many cores each? How much memory?  How far are they from the database (network latency)?
    - what's the payload size? (both the query text and the returned data)?  Do you observe query caching in the SQL server?

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard