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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / On-Premises or Azure SQL
Power Apps
Answered

On-Premises or Azure SQL

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

Can anyone tell me if they know which method would perform faster? Power Apps to On-Prem SQL using a Gateway? or Power App to Azure SQL?

 

I have an app using the first method (Power Apps to On-Prem SQL using a Gateway). On the app start up it runs a few collections (some concurrent, some not). In some cases depending on the WiFi connection, internet speed, etc.. it can take up to 2 minutes to complete.

 

Here is an example of my code:

Set(
 varSpinner,
 true
);
Concurrent(
//Collect current completed issued audits
 ClearCollect(
 colCompIssuedAudits,
 '[dbo].[rprCompIssuedAudits]'
 ),
//Collect current audit schedule with count of completion frequency
 ClearCollect(
 colAuditSchedule,
 AddColumns(
 '[dbo].[rprAuditSchedule]',
 "IssueCount",
 LookUp(
 '[dbo].[rprCompIssuedAudits]',
 Id_AuditSchedule = '[dbo].[rprCompIssuedAudits]'[@AuditSchedule_Id],
 IssueCount
 ),
 "Audit",
 LookUp(
 '[dbo].[rprAudits]',
 Audit_Id = '[dbo].[rprAudits]'[@Id_Audit],
 Audit
 )
 )
 ),
//Collect restricted auditors 
 ClearCollect(
 colRestricted,
 '[dbo].[rprRestricted]'
 )
);
//Check if user is a restricted auditor
If(
 CountRows(
 Filter(
 colRestricted,
 Auditor = User().FullName
 )
 ) = 0,
//If true, select random schedule audit Id (Id_AuditSchedule) from audit colAuditSchedule filtering by IssueCount
 Set(
 varRandomAudit,
 First(
 Shuffle(
 Filter(
 colAuditSchedule,
 Or(
 Frequency > IssueCount,
 IsBlank(IssueCount)
 )
 )
 )
 )
 ),
//If false, select random schedule audit it (Id_AuditSchedule) from colAuditSchedule filtering by area
 Set(
 varRandomAudit,
 First(
 Shuffle(
 Filter(
 colAuditSchedule,
 Cell = lblRestrictedAuditArea.Text
 )
 )
 )
 )
);
Concurrent(
//Patch random audit schedule Id to issued audit table (rprIssuedAudits) for historical purposes
 Set(
 varIssuedAuditId,
 Patch(
 '[dbo].[rprIssuedAudits]',
 Defaults('[dbo].[rprIssuedAudits]'),
 {
 AuditSchedule_Id: varRandomAudit.Id_AuditSchedule,
 Auditor: User().FullName,
 IssuedDateTime: DateTimeValue(
 Text(
 Now(),
 DateTimeFormat.UTC
 )
 )
 }
 ).Id_IssuedAudit
 ),
//Collect questions from random scheduled audit varible (varRandomAudit)
 ClearCollect(
 colQuestions,
 Filter(
 '[dbo].[rprAuditQuestions]',
 Active = true,
 Audit_Id = varRandomAudit.Audit_Id
 )
 )
);
If(
 User().FullName = "AUG iPad",
 Set(
 varShowAuditInfo,
 true
 ),
 Set(
 varShowAuditInfo,
 true
 )
);
If(
 User().FullName = "AUG iPad",
 Set(
 varShowAuditInfo,
 false
 ),
 Set(
 varShowAuditInfo,
 true
 )
);
Set(
 varSpinner,
 false
)

Would it be better to move this to Azure SQL?

 

Thank you,

 

-Justair007

Categories:
  • Verified answer
    KrishnaV Profile Picture
    5,023 on at

    Hi @justair007 ,

     

    To best of my knowledge, Azure SQL performance is always much better than SQL with on-prem with Gateway. I would say you will see an improvement of at least 40%. One more thing is when we have SQL on-prem we will have to consider maintenance downtime whereas in Azure it is always on and high availability.

     

    See the below case studies:
    https://ieeexplore.ieee.org/document/8618405
    http://techgenix.com/azure-sql-or-sql-server-which-one-is-right-for-you/ 


    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community. 

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard