cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
justair007
Helper I
Helper I

On-Premises or Azure SQL

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

1 ACCEPTED SOLUTION

Accepted Solutions
KrishnaV
Super User III
Super User III

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.


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,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

1 REPLY 1
KrishnaV
Super User III
Super User III

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.


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,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,302)